提交 09b78bc1 编写于 作者: B Brandon Casey 提交者: Junio C Hamano

t7502-commit.sh: rearrange test to make more portable

Some shells have problems with one-shot environment variable export
and function calls. The sequence is rearranged to avoid the one-shot
and to allow the test script to be linked together with '&&'.
Signed-off-by: NBrandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 03b9dfb1
......@@ -228,10 +228,12 @@ EOF
test_expect_success 'a SIGTERM should break locks' '
echo >>negative &&
"$SHELL_PATH" -c '\''
! "$SHELL_PATH" -c '\''
echo kill -TERM $$ >> .git/FAKE_EDITOR
GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1 # should fail
! test -f .git/index.lock
GIT_EDITOR=.git/FAKE_EDITOR
export GIT_EDITOR
exec git commit -a'\'' &&
test ! -f .git/index.lock
'
rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册