Skip to content

Commit

Permalink
t7502: properly quote GIT_EDITOR
Browse files Browse the repository at this point in the history
One of the tests tries to ensure that editor is not run due
to an early failure. However, it needs to quote the pathname
of the trash directory used in $GIT_EDITOR, since git will
pass it along to the shell. In other words, the test would
pass whether the code was correct or not, since the unquoted
editor specification would never run.

We never noticed the problem because the code is indeed
correct, so git-commit never even tried to run the editor.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jul 26, 2012
1 parent a9ebc43 commit 34565f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t7502-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
test_must_fail git cherry-pick -n master &&
echo "editor not started" >.git/result &&
(
GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" &&
GIT_EDITOR="\"$(pwd)/.git/FAKE_EDITOR\"" &&
export GIT_EDITOR &&
test_must_fail git commit
) &&
Expand Down

0 comments on commit 34565f2

Please sign in to comment.