t7201: use 'git -C' to avoid subshell

Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Charvi Mendiratta committed Oct 20, 2020 at 17:13 UTC 627f2d79de1ac0d5a1cdf6a9dcf5c95e17b77b3a
1 file changed +2 -8
t/t7201-co.sh
+2 -8
@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '
339 git checkout master &&
340
341 mkdir subs &&
342 - (
343 - cd subs &&
344 - git checkout side
345 - ) &&
342 + git -C subs checkout side &&
343 ! test -f subs/one &&
344 rm -fr subs
345 '
@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '
354
355 git checkout master &&
356 mkdir -p subs &&
360 - (
361 - cd subs &&
362 - git checkout side -- bero
363 - ) &&
357 + git -C subs checkout side -- bero &&
358 test -f subs/bero
359 '
360