All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Legoll <vincent.legoll@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: cherry-pick strangeness
Date: Fri, 14 Jun 2019 09:26:30 +0200	[thread overview]
Message-ID: <CAEwRq=qufzNg_fBNPgSkV++VRHE2jE8q_iNBB1Fn=BQjTFRLEw@mail.gmail.com> (raw)
In-Reply-To: <CABPp-BGQ0frtOk7ZF4vnLdfeYCXibUaC4zUV1coTz=AzOvy8Lw@mail.gmail.com>

Hello,

On Fri, Jun 14, 2019 at 12:56 AM Elijah Newren <newren@gmail.com> wrote:
>
> On Thu, Jun 13, 2019 at 3:42 PM Vincent Legoll <vincent.legoll@gmail.com> wrote:
> >
> > What am I missing ?
>
> When you cherry-pick a commit, it reapplies its diff on top of a
> (usually different) commit, preserving the author name/email/date, but
> throwing away the committer name/email/date -- instead using your
> name/email and the time of the cherry-pick for the committer.  Since
> you are transplanting on the same commit, and you created both the
> original commit and the cherry-pick, the only thing that can be
> different is the committer timestamp.  Git records timestamps down to
> 1-second resolution.  If you run in a script, odds are that the
> original commit and the cherry-pick both run within the same second
> (though not always), and thus you end up with precisely the same
> commit.  When you run interactively, you take longer than a second
> between commands, and thus have a different committer date which
> naturally will have a different sha1sum.

Thanks for the thorough explanation.

Looks like this has nothing to do with "--[no-]ff" at all.

So if I put a "sleep 2" before each cherry-pick I won't get to see that
behavior, or if I had used something that changes the commit message
("-x", "-s" or maybe even "-S") ?

Shouldn't something about that be added to the man page to avoid
people scratch their heads ? (I can try to cook something if this is
deemed acceptable)

-- 
Vincent Legoll

  reply	other threads:[~2019-06-14  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 22:40 cherry-pick strangeness Vincent Legoll
2019-06-13 22:56 ` Elijah Newren
2019-06-14  7:26   ` Vincent Legoll [this message]
2019-06-15  0:24     ` Phil Hord

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='CAEwRq=qufzNg_fBNPgSkV++VRHE2jE8q_iNBB1Fn=BQjTFRLEw@mail.gmail.com' \
    --to=vincent.legoll@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@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.