Re: git-cherry-pick and git-commit --amend in version 1.7.6.4
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Oct 6, 2011, 13:44 UTC
- Message-ID
- <CAG+J_DyJri1iTMWbeab9Dm15=p2wDUw_vt7TXEYSyGXAK6zWkg@mail.gmail.com>
- In-Reply-To
- <4E8DABB0.4090206@6wind.com>
On Thu, Oct 6, 2011 at 9:22 AM, Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
Show 11 quoted lines
> 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'
I have a theory that determine_whence() inside commit.c isn't finding .git/CHERRY_PICK_HEAD:
else if (file_exists(git_path("CHERRY_PICK_HEAD")))
whence = FROM_CHERRY_PICK;That would cause the mis-attributed cherry-picked commit. commit.c is also responsible for removing CHERRY_PICK_HEAD, which is not happening correctly:
unlink(git_path("CHERRY_PICK_HEAD"));Maybe git_path("CHERRY_PICK_HEAD") is returning something unexpected. But the trace output looks fine.
Aside, I'm a little confused by the "setup:" output appearing above. In 1.7.5 and later, it requires setting GIT_TRACE_SETUP=1 to appear, but you reported you're having this problem with 1.7.6.4.
j.