From: Charvi Mendiratta Date: Tue, 20 Oct 2020 11:43:18 +0000 (+0530) Subject: t7201: use 'git -C' to avoid subshell X-Git-Tag: v2.30.0-rc0~145^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=627f2d79de1ac0d5a1cdf6a9dcf5c95e17b77b3a;p=thirdparty%2Fgit.git t7201: use 'git -C' to avoid subshell Signed-off-by: Charvi Mendiratta Signed-off-by: Junio C Hamano --- diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 74553f991b..5898182fd2 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' ' git checkout master && mkdir subs && - ( - cd subs && - git checkout side - ) && + git -C subs checkout side && ! test -f subs/one && rm -fr subs ' @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' ' git checkout master && mkdir -p subs && - ( - cd subs && - git checkout side -- bero - ) && + git -C subs checkout side -- bero && test -f subs/bero '