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

Re: Can git be stopped from inserting conflict markers during a merge?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Mar 8, 2008, 22:24 UTC
Message-ID
<46a038f90803081424s1a0091c6r4d9e24c62ef2bdd1@mail.gmail.com>
In-Reply-To
<alpine.LFD.1.00.0803081242040.5896@woody.linux-foundation.org>

On Sun, Mar 9, 2008 at 9:51 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

>  Do you want to just have both (with the base version, all three?) versions
>  of the file in your directory?

If that's what he is after, git-mergetool will do it - normally as a preparation to call xxdiff or something similar. William, perhaps git-mergetool is what you are after? You can look at the source -- it's shell -- if you want to tweak it.

But I think that what mercurial does is similar to Arch and Bazaar behaviour: it will update the file following "one side" of the merge, and then generate a .rej file with the unapplied hunks coming from the 'other side'. This selection is arbitrary, and doesn't work on octopus merges, so I end up not quite liking it. OTOH, if you open the .rej file with emacs in diff mode, it's bloody useful for fixing up patches so that they apply.

cheers,
m
Previous: Linus TorvaldsNext: Jakub Narebski
Message 3 of 4 in “Can git be stopped from inserting conflict markers during a merge?”
  1. William TanksleyMar 8, 2008
  2. Linus TorvaldsMar 8, 2008
  3. Martin LanghoffMar 8, 2008
  4. Jakub NarebskiMar 8, 2008

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.