Skip to content

Commit 1afe6e4

Browse files
committed
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 <[email protected]>
1 parent 664059f commit 1afe6e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/t5801-remote-helpers.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ test_expect_success 'pushing without refspecs' '
118118
(cd local2 &&
119119
echo content >>file &&
120120
git commit -a -m ten &&
121-
GIT_REMOTE_TESTGIT_REFSPEC="" test_must_fail git push 2>../error) &&
121+
GIT_REMOTE_TESTGIT_REFSPEC="" &&
122+
export GIT_REMOTE_TESTGIT_REFSPEC &&
123+
test_must_fail git push 2>../error) &&
122124
grep "remote-helper doesn.t support push; refspec needed" error
123125
'
124126

0 commit comments

Comments
 (0)