author | Junio C Hamano <gitster@pobox.com> | |
Wed, 13 Feb 2008 21:13:21 +0000 (13:13 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 13 Feb 2008 21:43:02 +0000 (13:43 -0800) | ||
commit | 077b725f0bbe2b6ca2deb569c22a6f0d7a374dd3 | |
tree | fc1ad4d4aecb438045874e12a354d766e3afa5ba | tree | snapshot |
parent | 04b330551e427f10ac9b3d9057e8451c8bf78fc7 | commit | diff |
Protect get_author_ident_from_commit() from filenames in work tree
We used to use "cat-file commit $commit" to extract the original
author information from existing commit, but an earlier commit
5ac2715 (Consistent message encoding while reusing log from an
existing commit) changed it to use "git show -s $commit". If
you have a file in your work tree that can be interpreted as a
valid object name (e.g. "HEAD"), this conversion will not work.
Disambiguate by marking the end of revision parameter on the
comand line with an explicit "--" to fix this.
This breakage is most visible with rebase when a file called
"HEAD" exists in the worktree.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We used to use "cat-file commit $commit" to extract the original
author information from existing commit, but an earlier commit
5ac2715 (Consistent message encoding while reusing log from an
existing commit) changed it to use "git show -s $commit". If
you have a file in your work tree that can be interpreted as a
valid object name (e.g. "HEAD"), this conversion will not work.
Disambiguate by marking the end of revision parameter on the
comand line with an explicit "--" to fix this.
This breakage is most visible with rebase when a file called
"HEAD" exists in the worktree.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-sh-setup.sh | diff | blob | history | |
t/t3404-rebase-interactive.sh | diff | blob | history |