{"thread":{"id":"28590","subject":"git-cherry-pick and author field in version 1.7.6.4","startedAt":"2011-10-05T14:51:58Z","lastAt":"2011-10-06T13:34:15Z","messageCount":7,"participants":["Nicolas Dichtel","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"176928","messageId":"4E8C6F0E.7000508@6wind.com","threadId":"28590","inReplyTo":null,"subject":"git-cherry-pick and author field in version 1.7.6.4","fromName":"Nicolas Dichtel","fromEmail":"nicolas.dichtel@6wind.com","sentAt":"2011-10-05T14:51:58Z","receivedAt":"2011-10-05T14:51:58Z","isPatch":false,"sender":{"key":"nicolas.dichtel@6wind.com","avatar":null},"body":"Hi all,\n\nin the last stable version (1.7.6.4), when I perform a git-cherry-pick, the \ninitial author of the patch is erased whith my name (it was not the case in \nversion 1.7.3.4 and prior). Is this behavior intended ? Is there an option to \nkeep the initial author of the patch?\n\n\nRegards,\nNicolas\n"},{"id":"176943","messageId":"20111005174138.GA22962@sigill.intra.peff.net","threadId":"28590","inReplyTo":"4E8C6F0E.7000508@6wind.com","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-10-05T17:41:39Z","receivedAt":"2011-10-05T17:41:39Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 05, 2011 at 04:51:58PM +0200, Nicolas Dichtel wrote:\n\n> in the last stable version (1.7.6.4), when I perform a\n> git-cherry-pick, the initial author of the patch is erased whith my\n> name (it was not the case in version 1.7.3.4 and prior). Is this\n> behavior intended ? Is there an option to keep the initial author of\n> the patch?\n\nI can't reproduce your problem:\n\n  git init repo &&\n  cd repo &&\n  echo content >file && git add file && git commit -m base &&\n  echo changes >>file &&\n  git commit --author='Other Person <other@example.com>' -a -m other &&\n  git tag other &&\n  git reset --hard HEAD^ &&\n  git cherry-pick other\n\ngives this output for the cherry-pick:\n\n  [master 6eb207f] other\n   Author: Other Person <other@example.com>\n   1 files changed, 1 insertions(+), 0 deletions(-)\n\nand the resulting commit looks good:\n\n  $ git log -1 --format='%an <%ae>'\n  Other Person <other@example.com>\n\nDoes the script above work for you? If so, then what is different about\nyour problematic case?\n\n-Peff\n"},{"id":"177009","messageId":"4E8D5DEA.9010500@6wind.com","threadId":"28590","inReplyTo":"20111005174138.GA22962@sigill.intra.peff.net","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Nicolas Dichtel","fromEmail":"nicolas.dichtel@6wind.com","sentAt":"2011-10-06T07:51:06Z","receivedAt":"2011-10-06T07:51:06Z","isPatch":false,"sender":{"key":"nicolas.dichtel@6wind.com","avatar":null},"body":"Le 05/10/2011 19:41, Jeff King a écrit :\n> On Wed, Oct 05, 2011 at 04:51:58PM +0200, Nicolas Dichtel wrote:\n>\n>> in the last stable version (1.7.6.4), when I perform a\n>> git-cherry-pick, the initial author of the patch is erased whith my\n>> name (it was not the case in version 1.7.3.4 and prior). Is this\n>> behavior intended ? Is there an option to keep the initial author of\n>> the patch?\n>\n> I can't reproduce your problem:\n>\n>    git init repo&&\n>    cd repo&&\n>    echo content>file&&  git add file&&  git commit -m base&&\n>    echo changes>>file&&\n>    git commit --author='Other Person<other@example.com>' -a -m other&&\n>    git tag other&&\n>    git reset --hard HEAD^&&\n>    git cherry-pick other\n>\n> gives this output for the cherry-pick:\n>\n>    [master 6eb207f] other\n>     Author: Other Person<other@example.com>\n>     1 files changed, 1 insertions(+), 0 deletions(-)\n>\n> and the resulting commit looks good:\n>\n>    $ git log -1 --format='%an<%ae>'\n>    Other Person<other@example.com>\n>\n> Does the script above work for you? If so, then what is different about\n> your problematic case?\nHere is my sequence. I'm in a linux tree with a remote that point to linus tree \nand I want to cherry-pick a patch from this remote:\n\n# git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n[dev 87ce387] drivers/net/usb/asix.c: Fix unaligned accesses\n  1 files changed, 33 insertions(+), 1 deletions(-)\n# git log -1 --format='%an<%ae>'\nNicolas Dichtel<nicolas.dichtel@6wind.com>\n# git log -1 --format='%an<%ae>' 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\nNeil Jones<NeilJay@gmail.com>\n#\n\nMaybe it is related to the problem I've reported in another thread:\nhttp://comments.gmane.org/gmane.comp.version-control.git/182853\n\n\nRegards,\nNicolas\n"},{"id":"177015","messageId":"20111006112742.GA4445@sigill.intra.peff.net","threadId":"28590","inReplyTo":"4E8D5DEA.9010500@6wind.com","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-10-06T11:27:42Z","receivedAt":"2011-10-06T11:27:42Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 06, 2011 at 09:51:06AM +0200, Nicolas Dichtel wrote:\n\n> Here is my sequence. I'm in a linux tree with a remote that point to\n> linus tree and I want to cherry-pick a patch from this remote:\n> \n> # git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n> [dev 87ce387] drivers/net/usb/asix.c: Fix unaligned accesses\n>  1 files changed, 33 insertions(+), 1 deletions(-)\n> # git log -1 --format='%an<%ae>'\n> Nicolas Dichtel<nicolas.dichtel@6wind.com>\n> # git log -1 --format='%an<%ae>' 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n> Neil Jones<NeilJay@gmail.com>\n> #\n\nHmph. Odd:\n\n  $ cd linux-2.6\n  $ git checkout -b dev 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9^\n  Switched to a new branch 'dev'\n  $ git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n  [dev 78929c2] drivers/net/usb/asix.c: Fix unaligned accesses\n   Author: Neil Jones <NeilJay@gmail.com>\n   1 files changed, 33 insertions(+), 1 deletions(-)\n  $ git log -1 --format='%an <%ae>'\n  Neil Jones <NeilJay@gmail.com>\n\n> Maybe it is related to the problem I've reported in another thread:\n> http://comments.gmane.org/gmane.comp.version-control.git/182853\n\nPossibly. That issue is about the commit that comes _after_ the\ncherry-pick, and in this instance, things are already wrong for you by\nthe time the cherry-pick has completed.\n\nHowever, the problem has to do with leaving a stale state file in .git,\nso perhaps a previous partially-completed cherry-pick has left cruft in\n.git that is confusing this cherry-pick (i.e., I can't reproduce because\nit is being affected by something that happened before the commands\nabove). So let's see what Jay comes up with for solving the other\nproblem, and I suspect it may just fix this issue, too.\n\nYou might also repeating the commands above. If it still fails, maybe\ntry removing \".git/CHERRY_PICK_HEAD\" if it exists and see if that helps.\n\n-Peff\n"},{"id":"177016","messageId":"4E8DA0EE.50208@6wind.com","threadId":"28590","inReplyTo":"20111006112742.GA4445@sigill.intra.peff.net","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Nicolas Dichtel","fromEmail":"nicolas.dichtel@6wind.com","sentAt":"2011-10-06T12:37:02Z","receivedAt":"2011-10-06T12:37:02Z","isPatch":false,"sender":{"key":"nicolas.dichtel@6wind.com","avatar":null},"body":"Le 06/10/2011 13:27, Jeff King a écrit :\n> On Thu, Oct 06, 2011 at 09:51:06AM +0200, Nicolas Dichtel wrote:\n>\n>> Here is my sequence. I'm in a linux tree with a remote that point to\n>> linus tree and I want to cherry-pick a patch from this remote:\n>>\n>> # git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n>> [dev 87ce387] drivers/net/usb/asix.c: Fix unaligned accesses\n>>   1 files changed, 33 insertions(+), 1 deletions(-)\n>> # git log -1 --format='%an<%ae>'\n>> Nicolas Dichtel<nicolas.dichtel@6wind.com>\n>> # git log -1 --format='%an<%ae>' 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n>> Neil Jones<NeilJay@gmail.com>\n>> #\n>\n> Hmph. Odd:\n>\n>    $ cd linux-2.6\n>    $ git checkout -b dev 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9^\n>    Switched to a new branch 'dev'\n>    $ git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n>    [dev 78929c2] drivers/net/usb/asix.c: Fix unaligned accesses\n>     Author: Neil Jones<NeilJay@gmail.com>\n>     1 files changed, 33 insertions(+), 1 deletions(-)\n>    $ git log -1 --format='%an<%ae>'\n>    Neil Jones<NeilJay@gmail.com>\n# git checkout -b dev 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9^\nChecking out files: 100% (25721/25721), done.\nSwitched to a new branch 'dev'\n# git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9\n[dev 693df4c] drivers/net/usb/asix.c: Fix unaligned accesses\n  1 files changed, 33 insertions(+), 1 deletions(-)\n# git log -1 --format='%an<%ae>'\nNicolas Dichtel<nicolas.dichtel@6wind.com>\n#\n\n>\n>> Maybe it is related to the problem I've reported in another thread:\n>> http://comments.gmane.org/gmane.comp.version-control.git/182853\n>\n> Possibly. That issue is about the commit that comes _after_ the\n> cherry-pick, and in this instance, things are already wrong for you by\n> the time the cherry-pick has completed.\n>\n> However, the problem has to do with leaving a stale state file in .git,\n> so perhaps a previous partially-completed cherry-pick has left cruft in\n> .git that is confusing this cherry-pick (i.e., I can't reproduce because\n> it is being affected by something that happened before the commands\n> above). So let's see what Jay comes up with for solving the other\n> problem, and I suspect it may just fix this issue, too.\nI think so too. Will wait.\n\n>\n> You might also repeating the commands above. If it still fails, maybe\n> try removing \".git/CHERRY_PICK_HEAD\" if it exists and see if that helps.\nNo, it just allow the commit --amend, but this will not change the author.\n\n\nRegards,\nNicolas\n"},{"id":"177023","messageId":"20111006132646.GB1792@sigill.intra.peff.net","threadId":"28590","inReplyTo":"4E8DA0EE.50208@6wind.com","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-10-06T13:26:46Z","receivedAt":"2011-10-06T13:26:46Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 06, 2011 at 02:37:02PM +0200, Nicolas Dichtel wrote:\n\n> >>Maybe it is related to the problem I've reported in another thread:\n> >>http://comments.gmane.org/gmane.comp.version-control.git/182853\n> >\n> >Possibly. That issue is about the commit that comes _after_ the\n> >cherry-pick, and in this instance, things are already wrong for you by\n> >the time the cherry-pick has completed.\n> >\n> >However, the problem has to do with leaving a stale state file in .git,\n> >so perhaps a previous partially-completed cherry-pick has left cruft in\n> >.git that is confusing this cherry-pick (i.e., I can't reproduce because\n> >it is being affected by something that happened before the commands\n> >above). So let's see what Jay comes up with for solving the other\n> >problem, and I suspect it may just fix this issue, too.\n> I think so too. Will wait.\n\nSince you can reproduce this so readily, and since you said it seems to\nwork with older versions of git, you might try bisecting. There's a\nreasonable chance it will just end up at Jay's CHERRY_PICK_HEAD commit,\nbut it might be worth doing.\n\n-Peff\n"},{"id":"177025","messageId":"4E8DAE57.60705@6wind.com","threadId":"28590","inReplyTo":"20111006132646.GB1792@sigill.intra.peff.net","subject":"Re: git-cherry-pick and author field in version 1.7.6.4","fromName":"Nicolas Dichtel","fromEmail":"nicolas.dichtel@6wind.com","sentAt":"2011-10-06T13:34:15Z","receivedAt":"2011-10-06T13:34:15Z","isPatch":false,"sender":{"key":"nicolas.dichtel@6wind.com","avatar":null},"body":"Le 06/10/2011 15:26, Jeff King a écrit :\n> On Thu, Oct 06, 2011 at 02:37:02PM +0200, Nicolas Dichtel wrote:\n>\n>>>> Maybe it is related to the problem I've reported in another thread:\n>>>> http://comments.gmane.org/gmane.comp.version-control.git/182853\n>>>\n>>> Possibly. That issue is about the commit that comes _after_ the\n>>> cherry-pick, and in this instance, things are already wrong for you by\n>>> the time the cherry-pick has completed.\n>>>\n>>> However, the problem has to do with leaving a stale state file in .git,\n>>> so perhaps a previous partially-completed cherry-pick has left cruft in\n>>> .git that is confusing this cherry-pick (i.e., I can't reproduce because\n>>> it is being affected by something that happened before the commands\n>>> above). So let's see what Jay comes up with for solving the other\n>>> problem, and I suspect it may just fix this issue, too.\n>> I think so too. Will wait.\n>\n> Since you can reproduce this so readily, and since you said it seems to\n> work with older versions of git, you might try bisecting. There's a\n> reasonable chance it will just end up at Jay's CHERRY_PICK_HEAD commit,\n> but it might be worth doing.\nI've try with another user on the same host and it works, so I end up to my \nenvironment config ... and it's my fault: I've some variables set (GITPERLLIB \nand GIT_EXEC_PATH) that point to an older git version.\nNow it works, sorry for the noise!\n\nThe second pb, about the author is fixed too.\n\nRegards,\nNicolas\n"}]}