git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: automerge implementation ideas for Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2021, 02:26 UTC
Message-ID
<xmqqh7n9aer5.fsf@gitster.c.googlers.com>
In-Reply-To
<20210122010902.GA48178@ellen>
Seth House <seth@eseth.com> writes:
Show 25 quoted lines
> On Thu, Jan 21, 2021 at 02:50:12PM -0800, Junio C Hamano wrote:
>> I'd rather not to see us do "text processing" in shell
>
> Agreed. What are your thoughts on the #2 approach?
>
> I noticed the comment in `git/xdiff-interface.h` about xdiff's gigabyte
> limit so I created a 973 MB text file with a conflict and ran #2 through
> a few mergetools to see how it went. I put /usr/bin/time in front of the
> two `git merge-file` invocations. I know one person's machine is not
> a benchmark but perhaps it's a discussion point?
>
> Each `git merge-file` call took ~11 seconds on my middle-tier laptop and
> did not use enough RAM to hit swap.
>
> Writing the near-gigabyte LOCAL, BASE, REMOTE, & BACKUP files went
> pretty quick. The mergetools themselves had mixed results:
>
> - vimdiff took several minutes (and a lot of swap) to open all four
>   files but did eventually work.
> - tkdiff crashed.
> - Meld spun for ~10 minutes and never opened.
>
> My takeaway: when trying to use a mergetool on a very large file, the
> two `git merge-file` invocations are not likely to be where the
> performance concern is. #2 is my preferred approach so far.

Yeah, I am no expert about Windows, but at least I know how well "git merge-file" should work _anywhere_ (as opposed to "read -r" plus shell loop that I would not trust on a platform where even basic things like "sed" behaves differently from what we expect X-<), so from that point of view, it is vastly more preferrable, if the choices were only between #1 and #2.

Previous: Seth HouseNext: brian m. carlson
Message 16 of 24 in “fixup! mergetool: add automerge configuration”
  1. fixup! mergetool: add automerge configurationDavid Aguilar, Jan 9, 2021
  2. brian m. carlsonJan 9, 2021
  3. fixup! mergetool: add automerge configurationDavid Aguilar, Jan 9, 2021
  4. Seth HouseJan 9, 2021
  5. Junio C HamanoJan 9, 2021
  6. Junio C HamanoJan 9, 2021
  7. Junio C HamanoJan 10, 2021
  8. Junio C HamanoJan 10, 2021
  9. Re* [PATCH v2] fixup! mergetool: add automerge configurationJunio C Hamano, Jan 10, 2021
  10. Seth HouseJan 10, 2021
  11. Junio C HamanoJan 10, 2021
  12. Seth HouseJan 16, 2021
  13. automerge implementation ideas for WindowsSeth House, Jan 20, 2021
  14. Junio C HamanoJan 21, 2021
  15. Seth HouseJan 22, 2021
  16. Junio C HamanoJan 22, 2021
  17. brian m. carlsonJan 22, 2021
  18. Johannes SchindelinJan 22, 2021
  19. brian m. carlsonJan 22, 2021
  20. Johannes SchindelinJan 26, 2021
  21. Seth HouseJan 26, 2021
  22. Junio C HamanoJan 26, 2021
  23. Seth HouseJan 27, 2021
  24. Junio C HamanoJan 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.