t7502: properly quote GIT_EDITOR
authorJeff King <peff@peff.net>
Thu, 26 Jul 2012 20:28:00 +0000 (16:28 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Jul 2012 21:23:35 +0000 (14:23 -0700)
commit34565f27fef10546a62c734c55c0d280aad63460
tree1e030e05febb3b7e4e7bc6fe3f9328c59f8060e2
parenta9ebc43bd07e219922d1dab17df319f1cae5d600
t7502: properly quote GIT_EDITOR

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>
t/t7502-commit.sh