git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Pimlott <andrew@pimlott.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git <git@vger.kernel.org>,
	"Frédéric Brière" <fbriere@fbriere.net>,
	"Michael J Gruber" <git@drmicha.warpmail.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: Thu, 01 Jul 2010 14:33:18 -0700	[thread overview]
Message-ID: <1278019489-sup-4929@pimlott.net> (raw)
In-Reply-To: <20100701210919.GA4283@burratino>

Excerpts from Jonathan Nieder's message of Thu Jul 01 14:09:19 -0700 2010:
> Example:
> 
>  o---o---F---X'---G---U [upstream]
>           \        \
>            X----Y---M---T [topic]
> 
> Suppose the author of the ‘topic’ branch starts from upstream
> commit F and makes a few changes.  One is applied upstream, and
> additionally there is some other useful upstream change, so he
> performs a merge to include the upstream updates into topic.
> The expected output from ‘cherry’ is:
> 
>  + T
>  + Y
>  - X
> 
> Consider the author of a different branch, also called ‘topic’, but
> this one starts from commit G.  Some infrastructure from an existing 
> branch is needed, so first she merges that.  Then she adds her own
> commit.  The expected output from ‘cherry’ is:
> 
>  + T
>  + Y
>  + X
> 
> since none of the new commits have been applied upstream since
> the fork point.
> 
> ‘cherry’ cannot distinguish between these two cases

Thanks for the awesome explanation!  (I looked at the code but would not
have pulled this understanding.)  I would still say the first output is
the more reasonable: it's more likely (in my estimate) the wanted
result, and in the case where it's not it's at least easily
comprehended.  

Anyway, the doc patch helps, and I would love git cherry --full.

Andrew

  reply	other threads:[~2010-07-01 21:33 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 [this message]
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
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=1278019489-sup-4929@pimlott.net \
    --to=andrew@pimlott.net \
    --cc=b.steinbrink@gmx.de \
    --cc=fbriere@fbriere.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --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).