Skip to content

Commit e974e06

Browse files
sunshinecogitster
authored andcommitted
t7000-t7999: fix broken &&-chains
Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c8ce376 commit e974e06

7 files changed

+57
-57
lines changed

t/t7001-mv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ test_expect_success 'moving nested submodules' '
509509
touch nested_level1 &&
510510
git init &&
511511
git add . &&
512-
git commit -m "nested level 1"
512+
git commit -m "nested level 1" &&
513513
git submodule add ../sub_nested_nested &&
514514
git commit -m "add nested level 2"
515515
) &&

t/t7201-co.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,10 @@ test_expect_success 'checkout with --merge' '
528528
cat sample >filf &&
529529
git checkout -m -- fild file filf &&
530530
(
531-
echo "<<<<<<< ours"
532-
echo ourside
533-
echo "======="
534-
echo theirside
531+
echo "<<<<<<< ours" &&
532+
echo ourside &&
533+
echo "=======" &&
534+
echo theirside &&
535535
echo ">>>>>>> theirs"
536536
) >merged &&
537537
test_cmp expect fild &&
@@ -549,12 +549,12 @@ test_expect_success 'checkout with --merge, in diff3 -m style' '
549549
cat sample >filf &&
550550
git checkout -m -- fild file filf &&
551551
(
552-
echo "<<<<<<< ours"
553-
echo ourside
554-
echo "||||||| base"
555-
echo original
556-
echo "======="
557-
echo theirside
552+
echo "<<<<<<< ours" &&
553+
echo ourside &&
554+
echo "||||||| base" &&
555+
echo original &&
556+
echo "=======" &&
557+
echo theirside &&
558558
echo ">>>>>>> theirs"
559559
) >merged &&
560560
test_cmp expect fild &&
@@ -572,10 +572,10 @@ test_expect_success 'checkout --conflict=merge, overriding config' '
572572
cat sample >filf &&
573573
git checkout --conflict=merge -- fild file filf &&
574574
(
575-
echo "<<<<<<< ours"
576-
echo ourside
577-
echo "======="
578-
echo theirside
575+
echo "<<<<<<< ours" &&
576+
echo ourside &&
577+
echo "=======" &&
578+
echo theirside &&
579579
echo ">>>>>>> theirs"
580580
) >merged &&
581581
test_cmp expect fild &&
@@ -593,12 +593,12 @@ test_expect_success 'checkout --conflict=diff3' '
593593
cat sample >filf &&
594594
git checkout --conflict=diff3 -- fild file filf &&
595595
(
596-
echo "<<<<<<< ours"
597-
echo ourside
598-
echo "||||||| base"
599-
echo original
600-
echo "======="
601-
echo theirside
596+
echo "<<<<<<< ours" &&
597+
echo ourside &&
598+
echo "||||||| base" &&
599+
echo original &&
600+
echo "=======" &&
601+
echo theirside &&
602602
echo ">>>>>>> theirs"
603603
) >merged &&
604604
test_cmp expect fild &&

t/t7400-submodule-basic.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ test_expect_success '../bar/a/b/c works with relative local path - ../foo/bar.gi
819819
cp pristine-.git-config .git/config &&
820820
cp pristine-.gitmodules .gitmodules &&
821821
mkdir -p a/b/c &&
822-
(cd a/b/c; git init) &&
822+
(cd a/b/c && git init) &&
823823
git config remote.origin.url ../foo/bar.git &&
824824
git submodule add ../bar/a/b/c ./a/b/c &&
825825
git submodule init &&

t/t7406-submodule-update.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,9 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
865865
(cd submodule/subsubmodule &&
866866
git log > ../../expected
867867
) &&
868-
(cd .git/modules/submodule/modules/subsubmodule
868+
(cd .git/modules/submodule/modules/subsubmodule &&
869869
git log > ../../../../../actual
870-
)
870+
) &&
871871
test_cmp actual expected
872872
)
873873
'
@@ -886,7 +886,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '
886886
git commit -am "pre move" &&
887887
H2=$(git rev-parse --short HEAD) &&
888888
git status | sed "s/$H/XXX/" >expect &&
889-
H=$(cd submodule2; git rev-parse HEAD) &&
889+
H=$(cd submodule2 && git rev-parse HEAD) &&
890890
git rm --cached submodule2 &&
891891
rm -rf submodule2 &&
892892
mkdir -p "moved/sub module" &&

t/t7408-submodule-reference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ test_expect_success 'preparing second superproject with a nested submodule plus
148148
cd supersuper &&
149149
echo "I am super super." >file &&
150150
git add file &&
151-
git commit -m B-super-super-initial
151+
git commit -m B-super-super-initial &&
152152
git submodule add "file://$base_dir/super" subwithsub &&
153153
git commit -m B-super-super-added &&
154154
git submodule update --init --recursive &&

t/t7501-commit.sh

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ test_expect_success 'sign off (1)' '
411411
git commit -s -m "thank you" &&
412412
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
413413
(
414-
echo thank you
415-
echo
414+
echo thank you &&
415+
echo &&
416416
git var GIT_COMMITTER_IDENT |
417417
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
418418
) >expected &&
@@ -430,9 +430,9 @@ test_expect_success 'sign off (2)' '
430430
$existing" &&
431431
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
432432
(
433-
echo thank you
434-
echo
435-
echo $existing
433+
echo thank you &&
434+
echo &&
435+
echo $existing &&
436436
git var GIT_COMMITTER_IDENT |
437437
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
438438
) >expected &&
@@ -450,9 +450,9 @@ test_expect_success 'signoff gap' '
450450
$alt" &&
451451
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
452452
(
453-
echo welcome
454-
echo
455-
echo $alt
453+
echo welcome &&
454+
echo &&
455+
echo $alt &&
456456
git var GIT_COMMITTER_IDENT |
457457
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
458458
) >expected &&
@@ -470,11 +470,11 @@ We have now
470470
$alt" &&
471471
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
472472
(
473-
echo welcome
474-
echo
475-
echo We have now
476-
echo $alt
477-
echo
473+
echo welcome &&
474+
echo &&
475+
echo We have now &&
476+
echo $alt &&
477+
echo &&
478478
git var GIT_COMMITTER_IDENT |
479479
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
480480
) >expected &&
@@ -491,11 +491,11 @@ non-trailer line
491491
Myfooter: x" &&
492492
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
493493
(
494-
echo subject
495-
echo
496-
echo non-trailer line
497-
echo Myfooter: x
498-
echo
494+
echo subject &&
495+
echo &&
496+
echo non-trailer line &&
497+
echo Myfooter: x &&
498+
echo &&
499499
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
500500
) >expected &&
501501
test_cmp expected actual &&
@@ -508,10 +508,10 @@ non-trailer line
508508
Myfooter: x" &&
509509
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
510510
(
511-
echo subject
512-
echo
513-
echo non-trailer line
514-
echo Myfooter: x
511+
echo subject &&
512+
echo &&
513+
echo non-trailer line &&
514+
echo Myfooter: x &&
515515
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
516516
) >expected &&
517517
test_cmp expected actual
@@ -524,10 +524,10 @@ test_expect_success 'multiple -m' '
524524
git commit -m "one" -m "two" -m "three" &&
525525
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
526526
(
527-
echo one
528-
echo
529-
echo two
530-
echo
527+
echo one &&
528+
echo &&
529+
echo two &&
530+
echo &&
531531
echo three
532532
) >expected &&
533533
test_cmp expected actual

t/t7506-status-submodule.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ test_expect_success 'status with added and untracked file in modified submodule
193193

194194
test_expect_success 'setup .git file for sub' '
195195
(cd sub &&
196-
rm -f new-file
196+
rm -f new-file &&
197197
REAL="$(pwd)/../.real" &&
198-
mv .git "$REAL"
198+
mv .git "$REAL" &&
199199
echo "gitdir: $REAL" >.git) &&
200200
echo .real >>.gitignore &&
201201
git commit -m "added .real to .gitignore" .gitignore
@@ -209,12 +209,12 @@ test_expect_success 'status with added file in modified submodule with .git file
209209

210210
test_expect_success 'status with a lot of untracked files in the submodule' '
211211
(
212-
cd sub
212+
cd sub &&
213213
i=0 &&
214214
while test $i -lt 1024
215215
do
216-
>some-file-$i
217-
i=$(( $i + 1 ))
216+
>some-file-$i &&
217+
i=$(( $i + 1 )) || exit 1
218218
done
219219
) &&
220220
git status --porcelain sub 2>err.actual &&

0 commit comments

Comments
 (0)