Re: git rebase: unexpected conflict

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

 




On Wed, 7 Feb 2007, Junio C Hamano wrote:
> 
> That is because David Woodhouse has an evil merge at
> c45aa055c32b488fc3fd73c760df372b09acf69a.
> 
> Running "git show" on that commit would tell you the story.

It's not really "evil". It's just that our "--cc" strategy makes it look 
very odd. But if you then look at why it looks that odd, you can do:

	git diff 784f4d5..8dd851d drivers/mtd/nand/Kconfig

(those two sha1's are just the commits that got merged, as reported by 
"git show"), and you'll see what happened:

 - one branch added the MTD_NAND_CAFE entry
 - the other one had removed the MTD_NAND_AT91 entry
 - they were in the same location in the Kconfig file, so it was a real 
   data conflict
 - when David fixed it up, instead of just trivially selecting the config 
   entry that remained after the merge (MTD_NAND_CAFE), he *also* then 
   moved it to alphabetically the proper place in the file.

End result: doing a "git show" on the resulting commit does how something 
rather strange (the final result does indeed have lines that did not exist 
in *either* of the parents), but what it doesn't show is the cause of that 
strange thing, because that ended up being a non-conflict after the merge 
(ie remove the old entries from both files).

In general, the output of "--cc" for conflicting merges is really quite 
good, but it's can be a bit hard to read, and in cases like this, the 
"conflict" is shown in a way that doesn't exactly make the _original_ 
conflict obvious.

			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]