Re: git rebase: unexpected conflict

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]