Re: What should I do to display the diff of even a simple merge commit?

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

 



Petr Baudis <pasky@xxxxxxx> writes:

>   I'm not sure if there is any clever switch for this, but I usually
> just use one of
>
> 	git diff mergecommit^1 mergecommit
> 	git diff mergecommit^2 mergecommit
>
> depending on which parent I want the diff against. If you always do your
> merges as "on mainline, merging in a topic" without fast-forwarding,
> diff against the first parent will be probably the right one and you can
> simply use:
>
> 	git diff mergecommit^ mergecommit

Frankly, we should make "git log --first-parent -p" DTRT, I think.

The attitude towards merges we maintain officially is "all parents are
equal", but in practice, there often are cases where --first-parent
traversal makes a lot more sense when browsing the history (especially
"the official" one).  The use of that option should be a clear enough sign
that diff between the first parent and the merge result is asked for.
--
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]