All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] doc: don't claim that cherry-pick calls patch-id
Date: Wed, 25 Sep 2013 01:28:22 +0300	[thread overview]
Message-ID: <20130924222822.GA2308@redhat.com> (raw)
In-Reply-To: <20130924221409.GT9464@google.com>

On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote:
> Michael S. Tsirkin wrote:
> 
> > Subject: [PATCH] doc: don't claim that cherry-pick calls patch-id
> 
> s/cherry-pick/cherry/
> 
> > The id is already different for binary files.
> > Let's document that they are similar, not identical.
> 
> Thanks.
> 
> [...]
> > --- a/Documentation/git-cherry.txt
> > +++ b/Documentation/git-cherry.txt
> > @@ -13,12 +13,13 @@ SYNOPSIS
> >  DESCRIPTION
> >  -----------
> >  The changeset (or "diff") of each commit between the fork-point and <head>
> > -is compared against each commit between the fork-point and <upstream>.
> > +is compared against diff of each commit between the fork-point and <upstream>.
> 
> I think the old version of this sentence is clearer.
> 
> > -The commits are compared with their 'patch id', obtained from
> > -the 'git patch-id' program.
> > +The diffs are compared with their diff id (sha1) calculated after removing
> > +any whitespace and line numbers (similar but not necessarily identical
> > +to 'patch id', obtained from the 'git patch-id' program).
> 
> The hash used internally is just an implementation detail, so maybe this
> sentence could just be dropped?

I think the fact whitespace is ignored is relevant to users, no?
We probably should drop talking about hash here.

> >  Every commit that doesn't exist in the <upstream> branch
> > -has its id (sha1) reported, prefixed by a symbol.  The ones that have
> > +has its diff id (sha1) reported, prefixed by a symbol.  The ones that have
> 
> Confusingly, here 'id' means 'commit name'.  For example:
> 
>  $ git log --oneline -1 sb/repack-in-c
>  0b63c6a repack: improve warnings about failure of renaming and removing files
>  $ git cherry sb/repack-in-c^ sb/repack-in-c
>  + 0b63c6a5b78f3fdd8c4e4fed4e535e7f4eed4257
> 
> Hope that helps,
> Jonathan

  reply	other threads:[~2013-09-24 22:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24 22:05 [PATCH] doc: don't claim that cherry-pick calls patch-id Michael S. Tsirkin
2013-09-24 22:14 ` Jonathan Nieder
2013-09-24 22:28   ` Michael S. Tsirkin [this message]
2013-09-24 22:44     ` Jonathan Nieder
2013-09-24 22:52       ` Michael S. Tsirkin
2013-09-24 22:53         ` Jonathan Nieder
2013-09-24 22:58           ` Michael S. Tsirkin

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=20130924222822.GA2308@redhat.com \
    --to=mst@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /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.