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

Re: Wrong file diff for merge conflict

From
Stefan Bucur <stefan.bucur@gmail.com>
Date
Jul 6, 2009, 14:44 UTC
Message-ID
<8cdebd3f0907060744l75a11160v8b01e6923cc5c70e@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.01.0907051726020.3210@localhost.localdomain>

On Mon, Jul 6, 2009 at 3:33 AM, Linus Torvalds<torvalds@linux-foundation.org> wrote: [...]

Show 20 quoted lines
>
> The fact is, a traditional rcs three-way merge (which is pretty much what
> you get with git, ignoring the fact that we have other tools in addition
> to it, and ignoring things like criss-cross merges etc) just doesn't work
> the way you seem to think it should work. You simply don't get the
> original of one side by picking one side of the conflict markers. It will
> have merged the stuff that it thought merged cleanly, and not have any
> conflict markers at all for those parts.
>
> Of course, "what it thought merged cleanly" may not be what you want it to
> be. Sometimes you get a clean merge for things that you'd have wanted to
> conflict. And sometimes you get conflicts for stuff that you'd think is
> just silly and shouldn't have.
>
> There are no perfect file merge algorithms that I know of. Lots of people
> hate the diff3/merge behavior - it's by no means perfect. But so far, I've
> never seen anybody successfully advocate anything better either.
>
>                Linus
>

Indeed it seems I had a wrong image of how a conflict file should look. In the light of what you've told me now, everything makes sense :) Thank you very much for taking your time to explain these things!

Cheers, Stefan Bucur

Previous: Linus Torvalds
Message 7 of 7 in “Wrong file diff for merge conflict”
  1. Stefan BucurJul 4, 2009
  2. Linus TorvaldsJul 5, 2009
  3. Jakub NarebskiJul 5, 2009
  4. Junio C HamanoJul 5, 2009
  5. Stefan BucurJul 5, 2009
  6. Linus TorvaldsJul 6, 2009
  7. Stefan BucurJul 6, 2009

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.