t5510: do not leave changed cwd
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>
Michael J Gruber committed
Mar 4, 2016 at 11:53 UTC
816c19308b39d0f9f6d15e8320aa1d2ab148e3d2
1 file changed
+6
-4
t/t5510-fetch.sh
+6
-4
@@ -715,10 +715,12 @@ test_expect_success 'fetching with auto-gc does not lock up' '
715
EOF
716
git clone "file://$D" auto-gc &&
717
test_commit test2 &&
718
- cd auto-gc &&
719
- git config gc.autoPackLimit 1 &&
720
- GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
721
- ! grep "Should I try again" fetch.out
718
+ (
719
+ cd auto-gc &&
720
+ git config gc.autoPackLimit 1 &&
721
+ GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
722
+ ! grep "Should I try again" fetch.out
723
+ )
724
'
725
726
test_done