From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: "Andrew Pimlott" <andrew@pimlott.net>, git <git@vger.kernel.org>,
"Frédéric Brière" <fbriere@fbriere.net>,
"Jeff King" <peff@peff.net>,
"Björn Steinbrink" <B.Steinbrink@gmx.de>
Subject: Re: [PATCH] Documentation: 'cherry' does not cope well with merges from upstream
Date: Fri, 2 Jul 2010 03:18:12 -0500 [thread overview]
Message-ID: <20100702081812.GA9219@burratino> (raw)
In-Reply-To: <4C2D995D.2020708@drmicha.warpmail.net>
Michael J Gruber wrote:
> Jonathan Nieder venit, vidit, dixit 01.07.2010 23:09:
>> Add a BUGS section to explain the problem.
>
> This is not a bug. git cherry works exactly as described.
>
> At worst, it is a misfeature.
Unix man pages have a history of using BUGS sections to describe
misfeatures and even unavoidable design constraints.
One nice effect is to encourage people to think of programs as
fixable. But maybe it is bad PR. ;-)
> git cherry would be more useful if you could specify a "limit" which is
> an ancestor of "fork-point", not only descendants.
>
>> Thoughts? Improvements?
>
> Allow general "limit" :)
Hmm, I am not totally sure I understand. Conceptually ‘git cherry’
currently does something like the following:
1. List all commits limit..head and find their patch ids
(limit defaults to upstream if not specified)
2. List all commits head..upstream and find their patch ids
3. For each commit listed in step 1, check if it is in the
list from step 2 and print its commit id with a + or -
accordingly.
Are you suggesting that the limit should replace head in
step 2? Or something else?
> git-cherry(1) never speaks about upstream..head nor head..upstream. It
> uses "fork-point", and a merge creates a new "fork-point", i.e.
> merge-base.
This explanation becomes problematic when there is more than one merge-base:
http://thread.gmane.org/gmane.comp.version-control.git/150067/focus=150093
Thank you for the comments. I considered using the <limit> argument
to work around this but didn’t try the modification you suggest above.
I would be happy to find that it works (generalized for repos with
a more shallow history to --full).
Sleepily,
Jonathan
next prev parent reply other threads:[~2010-07-02 8:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 19:38 git cherry not marking commits with equivalent upstream Andrew Pimlott
2010-07-01 19:40 ` Andrew Pimlott
2010-07-01 20:41 ` Björn Steinbrink
2010-07-01 21:17 ` Andrew Pimlott
2010-07-01 21:09 ` [PATCH] Documentation: 'cherry' does not cope well with merges from upstream Jonathan Nieder
2010-07-01 21:33 ` Andrew Pimlott
2010-07-01 21:35 ` Jonathan Nieder
2010-07-01 23:52 ` Junio C Hamano
2010-07-02 0:51 ` Jonathan Nieder
2010-07-02 1:04 ` Jonathan Nieder
2010-07-02 7:46 ` Michael J Gruber
2010-07-02 8:18 ` Jonathan Nieder [this message]
2010-07-02 9:23 ` Michael J Gruber
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=20100702081812.GA9219@burratino \
--to=jrnieder@gmail.com \
--cc=B.Steinbrink@gmx.de \
--cc=andrew@pimlott.net \
--cc=fbriere@fbriere.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).