Re: git log and merge commits

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

 




On Mon, 14 May 2007, Geert Uytterhoeven wrote:
> 
> I noticed `git log -p' doesn't show the changes introduced by merge commits.
> This is true for plain `git log -p' and for `git log -p <filename>'.

The default diff output format is silent about merges, because merges can 
be shown multiple different ways, and you have to tell git which format 
you want.

"git show" defaults to using "--cc", which is usually what you want. But 
it can be a fairly expensive operation, so "git log" defaults to not 
showing the merges at all.

The alternative format is just plain "-c", which shows a combined merge 
(ie it effectively shows the diff from *both* parents for any file with 
content merging). It gets really really large, really easily, which is why 
"--cc" is often more interesting (since it shows what looks like just the 
potential conflicts!)

		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]

  Powered by Linux