Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15

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

From: Nicolas Dichtel <hidden>
Date: 2016-06-15 22:52:11

Le 05/10/2011 19:41, Jeff King a écrit :
On Wed, Oct 05, 2011 at 04:51:58PM +0200, Nicolas Dichtel wrote:
quoted
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[off-list ref]' -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[off-list ref]
    1 files changed, 1 insertions(+), 0 deletions(-)

and the resulting commit looks good:

   $ git log -1 --format='%an<%ae>'
   Other Person[off-list ref]

Does the script above work for you? If so, then what is different about
your problematic case?
Here is my sequence. I'm in a linux tree with a remote that point to linus tree 
and I want to cherry-pick a patch from this remote:

# git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
[dev 87ce387] drivers/net/usb/asix.c: Fix unaligned accesses
  1 files changed, 33 insertions(+), 1 deletions(-)
# git log -1 --format='%an<%ae>'
Nicolas Dichtel[off-list ref]
# git log -1 --format='%an<%ae>' 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
Neil Jones[off-list ref]
#

Maybe it is related to the problem I've reported in another thread:
http://comments.gmane.org/gmane.comp.version-control.git/182853


Regards,
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help