Skip to content

Commit 994fd91

Browse files
Michael J Grubergitster
authored andcommitted
t3404: make test 57 work with dash and others
The construct VAR=value test_must_fail command args works only for some shells (such as bash) but not others (such as dash) because VAR=value does not end up in the environment for command when it is called by the shell function test_must_fail. That is why we explicitly set and export variable in a subshell, i.e. ( VAR=value && export VAR && test_must_fail command args ) in most places already, bar the newly introduced 57 from b64b7fe (Add tests for rebase -i --root without --onto, 2012-06-26). Make test 57 use that construct also. Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b64b7fe commit 994fd91

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

t/t3404-rebase-interactive.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,11 @@ test_expect_success 'rebase -i --root retain root commit author and message' '
777777

778778
test_expect_success 'rebase -i --root temporary sentinel commit' '
779779
git checkout B &&
780-
FAKE_LINES="2" test_must_fail git rebase -i --root &&
780+
(
781+
FAKE_LINES="2" &&
782+
export FAKE_LINES &&
783+
test_must_fail git rebase -i --root
784+
) &&
781785
git cat-file commit HEAD | grep "^tree 4b825dc642cb" &&
782786
git rebase --abort
783787
'

0 commit comments

Comments
 (0)