From 1afe6e404453586a1095ce0f3f7e899e62ab237f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 25 Apr 2013 10:18:37 -0700 Subject: t5801: "VAR=VAL shell_func args" is forbidden It is not a portable expectation that a single-shot environment variable assignment works when calling a shell function, not a command. Set and export the variable before calling "test_must_fail git push" instead. This change would not hurt because this is the last command in the subprocess and the environment will not seep through to later tests without using a single-shot assignment. Signed-off-by: Junio C Hamano --- t/t5801-remote-helpers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 4dcf744f9..c956abd86 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -118,7 +118,9 @@ test_expect_success 'pushing without refspecs' ' (cd local2 && echo content >>file && git commit -a -m ten && - GIT_REMOTE_TESTGIT_REFSPEC="" test_must_fail git push 2>../error) && + GIT_REMOTE_TESTGIT_REFSPEC="" && + export GIT_REMOTE_TESTGIT_REFSPEC && + test_must_fail git push 2>../error) && grep "remote-helper doesn.t support push; refspec needed" error ' -- cgit v1.2.1