1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-01 13:36:12 +02:00

t7201: use 'git -C' to avoid subshell

Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Charvi Mendiratta 2020-10-20 17:13:18 +05:30 committed by Junio C Hamano
parent c327762f81
commit 627f2d79de

View File

@ -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
'