Re: git show -m with a parent number

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

 



On Sun, Mar 27, 2016 at 08:46:02PM +0000, Anatoly Borodin wrote:

> is there a good reason for `git show -m` to not accept the number of a
> parent of a merge commit? I can run `git show --first-parent COMMIT`,
> but need to write `git diff COMMIT^2 COMMIT` every time I want to diff
> with the second parent!

I think it could, but nobody has yet found it useful enough to
implement.

I am not sure of the workflow it would help. Personally, I use "-m" in
two situations:

  1. To puzzle out issues where "-c" or "--cc" do not show what I
     expected.

  2. With "--first-parent", to follow the linear history of a mainline
     branch, showing merged topic branches as a single diff.

For the first one, showing all diffs is what I want. For the second, it
only makes sense to for the first parent case, as following other
parents would zig-zag through history.

But perhaps you have some other use case in mind. In cases like these, I
think it is a good idea to implement the feature, and run with it for a
while, seeing how it can be used. And then if it proves useful, post the
patch to the list describing your experiences.

-Peff
--
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]