Skip to content

Commit 816c193

Browse files
Michael J Grubergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d562102 commit 816c193

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/t5510-fetch.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,12 @@ test_expect_success 'fetching with auto-gc does not lock up' '
715715
EOF
716716
git clone "file://$D" auto-gc &&
717717
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+
)
722724
'
723725

724726
test_done

0 commit comments

Comments
 (0)