From: Anatoly Borodin <anatoly.borodin@gmail.com>
To: git@vger.kernel.org
Subject: Re: git show -m with a parent number
Date: Wed, 30 Mar 2016 12:31:16 +0000 (UTC) [thread overview]
Message-ID: <ndggug$c87$1@ger.gmane.org> (raw)
In-Reply-To: 20160328191608.GA22602@sigill.intra.peff.net
Hi!
Jeff King <peff@peff.net> wrote:
> 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.
Lucky you! :) You probably don't need to inspect 9 month old ex-svn
branches with sync (i.e. 'trunk'->'feature') merges
*-...-*-...-*-...-*-.......-*---trunk
\ \ \ \ /
*-...-*-...-*-...-*-...-*---feature
(Not to forget some funny legacy inter-feature merges.)
It's not like `git diff X^2 X` is a big problem, but too much of a
copypaste.
The other thing that bugs me is that you can easily `git cherry-pick -m 2 X`,
but to see the diff that you are going to apply is not that trivial.
> 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.
I'll try. BTW, should it be like '-m[=parent]' for consistency,
or '-m [parent]' is ok?
PS Another idea:
'-m parent' makes sence in a normal, 2-branch merge. But what to do in a
case of an octopus merge? In a normal case I can treat '-m 2' as 'the
diff regarding the second parent', but also as 'the changes contributed
by the first parent (plus "evil")'. But with 3 and more branches '-m 3'
means 'the changes from 1 and 2'. Would it be possible to get only the
contribution from the second or third parent in this case?
Yeah, I know, there is `git diff parent1...parent3` etc, but not all the
changes from parent3 will always get to the merge commit.
--
Mit freundlichen Grüßen,
Anatoly Borodin
next prev parent reply other threads:[~2016-03-30 12:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-27 20:46 git show -m with a parent number Anatoly Borodin
2016-03-28 19:16 ` Jeff King
2016-03-28 19:31 ` Junio C Hamano
2016-03-30 12:31 ` Anatoly Borodin [this message]
2016-03-30 16:55 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ndggug$c87$1@ger.gmane.org' \
--to=anatoly.borodin@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.