]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5510: do not leave changed cwd
authorMichael J Gruber <git@drmicha.warpmail.net>
Fri, 4 Mar 2016 10:53:50 +0000 (11:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2016 18:22:55 +0000 (10:22 -0800)
t5510 carefully keeps the cwd at the test root by using either subshells
or explicit cd'ing back to the root. Use a subshell for the last
subtest, too.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5510-fetch.sh

index e3ee4bd700c3e72479ce1c7a4d8b1333a35a8473..5b52c877c3914b13629b2fd775ee45812e6facb5 100755 (executable)
@@ -715,10 +715,12 @@ test_expect_success 'fetching with auto-gc does not lock up' '
        EOF
        git clone "file://$D" auto-gc &&
        test_commit test2 &&
-       cd auto-gc &&
-       git config gc.autoPackLimit 1 &&
-       GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
-       ! grep "Should I try again" fetch.out
+       (
+               cd auto-gc &&
+               git config gc.autoPackLimit 1 &&
+               GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
+               ! grep "Should I try again" fetch.out
+       )
 '
 
 test_done