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

Re: git-cherry-pick and git-commit --amend in version 1.7.6.4

From
NDNicolas Dichtel <nicolas.dichtel@6wind.com>
Date
Oct 6, 2011, 13:22 UTC
Message-ID
<4E8DABB0.4090206@6wind.com>
In-Reply-To
<CAG+J_DzY6oW3CgCPDhD81Eue1Ygh+3pR7Q_NZEhauH_qkyUwqQ@mail.gmail.com>
Le 06/10/2011 15:09, Jay Soffian a écrit :
Show 21 quoted lines
> On Thu, Oct 6, 2011 at 3:37 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com>  wrote:
>> # ls .git
>> branches  COMMIT_EDITMSG  config  description  FETCH_HEAD  HEAD  hooks
>>   index info  logs  objects  ORIG_HEAD  packed-refs  refs
>
> No CHERRY_PICK_HEAD, so far so good.
>
>> # git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
>> [dev 4cca2c2] drivers/net/usb/asix.c: Fix unaligned accesses
>>   1 files changed, 33 insertions(+), 1 deletions(-)
>
> cherry-pick completes successfully.
>
>> # ls .git
>> branches  CHERRY_PICK_HEAD  COMMIT_EDITMSG  config  description  FETCH_HEAD
>> HEAD  hooks  index  info  logs  objects  ORIG_HEAD  packed-refs  refs
>
> This is bad. CHERRY_PICK_HEAD should only exist if the cherry-pick failed.
>
> I really don't know what could cause this. Possibly a hook in your repo?

No hooks: # ls .git/hooks/ applypatch-msg.sample post-commit.sample post-update.sample pre-commit.sample pre-rebase.sample commit-msg.sample post-receive.sample pre-applypatch.sample prepare-commit-msg.sample update.sample

>
> Using "GIT_TRACE=1 git cherry-pick
> 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9" will tell you whether git is
> running any hooks.
Here is the output:
# GIT_TRACE=1 git cherry-pick 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
trace: built-in: git 'cherry-pick' '3f78d1f210ff89af77f042ab7f4a8fee39feb1c9'
trace: run_command: 'commit' '-n' '-F' '.git/MERGE_MSG'
trace: exec: 'git' 'commit' '-n' '-F' '.git/MERGE_MSG'
setup: git_dir: .git
setup: worktree: /home/dichtel/DEV/linux-2.6
setup: cwd: /home/dichtel/DEV/linux-2.6
setup: prefix: (null)
trace: built-in: git 'commit' '-n' '-F' '.git/MERGE_MSG'
[master 8372873] drivers/net/usb/asix.c: Fix unaligned accesses
  1 files changed, 33 insertions(+), 1 deletions(-)
#
>
> I can't think of anything config-wise that would cause this behavior.
With a very basic config, the pb he still here:
cat ~/.gitconfig
[user]
         name = Nicolas Dichtel
         email = nicolas.dichtel@6wind.com
I will try to do some other tests.

Regards, Nicolas

Previous: Jay SoffianNext: Jay Soffian
Message 6 of 16 in “git-cherry-pick and git-commit --amend in version 1.7.6.4”
  1. Nicolas DichtelOct 5, 2011
  2. Jay SoffianOct 5, 2011
  3. Nicolas DichtelOct 6, 2011
  4. Nicolas DichtelOct 6, 2011
  5. Jay SoffianOct 6, 2011
  6. Nicolas DichtelOct 6, 2011
  7. Jay SoffianOct 6, 2011
  8. Junio C HamanoOct 5, 2011
  9. Jay SoffianOct 5, 2011
  10. Junio C HamanoOct 5, 2011
  11. Jay SoffianOct 5, 2011
  12. Junio C HamanoOct 5, 2011
  13. Jay SoffianOct 6, 2011
  14. Junio C HamanoOct 5, 2011
  15. Junio C HamanoOct 5, 2011
  16. Junio C HamanoOct 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.