git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-cherry-pick and author field in version 1.7.6.4

From
Jeff King <peff@peff.net>
Date
Oct 5, 2011, 17:41 UTC
Message-ID
<20111005174138.GA22962@sigill.intra.peff.net>
In-Reply-To
<4E8C6F0E.7000508@6wind.com>
On Wed, Oct 05, 2011 at 04:51:58PM +0200, Nicolas Dichtel wrote:
Show 5 quoted lines
> in the last stable version (1.7.6.4), when I perform a
> git-cherry-pick, the initial author of the patch is erased whith my
> name (it was not the case in version 1.7.3.4 and prior). Is this
> behavior intended ? Is there an option to keep the initial author of
> the patch?
I can't reproduce your problem:
  git init repo &&
  cd repo &&
  echo content >file && git add file && git commit -m base &&
  echo changes >>file &&
  git commit --author='Other Person <other@example.com>' -a -m other &&
  git tag other &&
  git reset --hard HEAD^ &&
  git cherry-pick other
gives this output for the cherry-pick:
  [master 6eb207f] other
   Author: Other Person <other@example.com>
   1 files changed, 1 insertions(+), 0 deletions(-)
and the resulting commit looks good:
  $ git log -1 --format='%an <%ae>'
  Other Person <other@example.com>

Does the script above work for you? If so, then what is different about your problematic case?

-Peff
Previous: Nicolas DichtelNext: Nicolas Dichtel
Message 2 of 7 in “git-cherry-pick and author field in version 1.7.6.4”
  1. Nicolas DichtelOct 5, 2011
  2. Jeff KingOct 5, 2011
  3. Nicolas DichtelOct 6, 2011
  4. Jeff KingOct 6, 2011
  5. Nicolas DichtelOct 6, 2011
  6. Jeff KingOct 6, 2011
  7. Nicolas DichtelOct 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.