From: Michael J Gruber Date: Wed, 4 Jul 2012 11:32:04 +0000 (+0200) Subject: t3404: make test 57 work with dash and others X-Git-Tag: v1.7.12-rc0~32^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=994fd91d1fd5e9feffc88ab7db19e9c9461b4543;p=git-core%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 6ffc9c20c..060f9d87d 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -777,7 +777,11 @@ test_expect_success 'rebase -i --root retain root commit author and message' ' test_expect_success 'rebase -i --root temporary sentinel commit' ' git checkout B && - FAKE_LINES="2" test_must_fail git rebase -i --root && + ( + FAKE_LINES="2" && + export FAKE_LINES && + test_must_fail git rebase -i --root + ) && git cat-file commit HEAD | grep "^tree 4b825dc642cb" && git rebase --abort '