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

Re: git rebase: unexpected conflict

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 7, 2007, 20:30 UTC
Message-ID
<Pine.LNX.4.64.0702071222470.8424@woody.linux-foundation.org>
In-Reply-To
<20070207200508.GE12140@mellanox.co.il>
On Wed, 7 Feb 2007, Michael S. Tsirkin wrote:
> 
> Sorry about being dense. What's evil there?
> There seems to have been a merge, and a conflict was resolved.

The reason Junio marked it as "evil" is that the resolved result was also moved around a bit, making it really hard to see what the original conflict was.

If David had resolved things in place, "git show" would actually have shown a nicer conflict diff, and _explained_ the conflict better (most likely by not showing it at all - which is just a sign that it was resolved cleanly in one direction). As it is, the conflict diff doesn't tell anything about what the conflict actually was, or whether it resolved trivially.

[ Note! Conflict diffs do *not* necessarily show the "conflict" at all: 
  we'll happily ignore any conflict that was resolved completely in one 
  direction, and the conflict diff output is really more of a warning that 
  something bad could have happened, and somebody tried to *hide* some 
  changes by calling it a merge. ]

So what makes that an "evil merge" is that it triggers the conflict diff, and that one really looks like somebody tried to add code and hide it. There was no actual evil activity involved, it was just done in a way that raise the red flags of the git --cc format.

So for a "non-evil" merge, the --cc output (which is what "git show" shows by default) will either be empty to indicate a trivial merge, or will give a hint about how the problem was resolved. Because of the movement, in this case it did neither.

		Linus
Previous: Michael S. TsirkinNext: Linus Torvalds
Message 15 of 16 in “git rebase: unexpected conflict”
  1. Michael S. TsirkinFeb 4, 2007
  2. Jakub NarebskiFeb 4, 2007
  3. Michael S. TsirkinFeb 4, 2007
  4. Junio C HamanoFeb 7, 2007
  5. Michael S. TsirkinFeb 7, 2007
  6. Junio C HamanoFeb 7, 2007
  7. Michael S. TsirkinFeb 7, 2007
  8. Junio C HamanoFeb 7, 2007
  9. Michael S. TsirkinFeb 7, 2007
  10. Junio C HamanoFeb 7, 2007
  11. Michael S. TsirkinFeb 8, 2007
  12. Junio C HamanoFeb 8, 2007
  13. Michael S. TsirkinFeb 8, 2007
  14. Michael S. TsirkinFeb 9, 2007
  15. Linus TorvaldsFeb 7, 2007
  16. Linus TorvaldsFeb 7, 2007

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.