t7000-t7999: fix broken &&-chains
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 2 Jul 2018 00:24:03 +0000 (20:24 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 21:38:47 +0000 (14:38 -0700)
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7001-mv.sh
t/t7201-co.sh
t/t7400-submodule-basic.sh
t/t7406-submodule-update.sh
t/t7408-submodule-reference.sh
t/t7501-commit.sh
t/t7506-status-submodule.sh
index cc3fd2baf2b80817ffc39ab67a988dcf31dbc537..9e59e5a5dd031f036237dafc3ebb1e3854883caa 100755 (executable)
@@ -509,7 +509,7 @@ test_expect_success 'moving nested submodules' '
                touch nested_level1 &&
                git init &&
                git add . &&
-               git commit -m "nested level 1"
+               git commit -m "nested level 1" &&
                git submodule add ../sub_nested_nested &&
                git commit -m "add nested level 2"
        ) &&
index 8d8a63a24be023b2a615bed1aa51c6812d8cbb83..94cb039a03f8378cec55f61a9694feca4a973d29 100755 (executable)
@@ -528,10 +528,10 @@ test_expect_success 'checkout with --merge' '
        cat sample >filf &&
        git checkout -m -- fild file filf &&
        (
-               echo "<<<<<<< ours"
-               echo ourside
-               echo "======="
-               echo theirside
+               echo "<<<<<<< ours" &&
+               echo ourside &&
+               echo "=======" &&
+               echo theirside &&
                echo ">>>>>>> theirs"
        ) >merged &&
        test_cmp expect fild &&
@@ -549,12 +549,12 @@ test_expect_success 'checkout with --merge, in diff3 -m style' '
        cat sample >filf &&
        git checkout -m -- fild file filf &&
        (
-               echo "<<<<<<< ours"
-               echo ourside
-               echo "||||||| base"
-               echo original
-               echo "======="
-               echo theirside
+               echo "<<<<<<< ours" &&
+               echo ourside &&
+               echo "||||||| base" &&
+               echo original &&
+               echo "=======" &&
+               echo theirside &&
                echo ">>>>>>> theirs"
        ) >merged &&
        test_cmp expect fild &&
@@ -572,10 +572,10 @@ test_expect_success 'checkout --conflict=merge, overriding config' '
        cat sample >filf &&
        git checkout --conflict=merge -- fild file filf &&
        (
-               echo "<<<<<<< ours"
-               echo ourside
-               echo "======="
-               echo theirside
+               echo "<<<<<<< ours" &&
+               echo ourside &&
+               echo "=======" &&
+               echo theirside &&
                echo ">>>>>>> theirs"
        ) >merged &&
        test_cmp expect fild &&
@@ -593,12 +593,12 @@ test_expect_success 'checkout --conflict=diff3' '
        cat sample >filf &&
        git checkout --conflict=diff3 -- fild file filf &&
        (
-               echo "<<<<<<< ours"
-               echo ourside
-               echo "||||||| base"
-               echo original
-               echo "======="
-               echo theirside
+               echo "<<<<<<< ours" &&
+               echo ourside &&
+               echo "||||||| base" &&
+               echo original &&
+               echo "=======" &&
+               echo theirside &&
                echo ">>>>>>> theirs"
        ) >merged &&
        test_cmp expect fild &&
index 6ab80a1dd83d90c8f9c38f3dc7407fdb38fd4bca..bfb09dd56615580fd82f8f3d680f45ecd12f9f0e 100755 (executable)
@@ -819,7 +819,7 @@ test_expect_success '../bar/a/b/c works with relative local path - ../foo/bar.gi
                cp pristine-.git-config .git/config &&
                cp pristine-.gitmodules .gitmodules &&
                mkdir -p a/b/c &&
-               (cd a/b/c; git init) &&
+               (cd a/b/c && git init) &&
                git config remote.origin.url ../foo/bar.git &&
                git submodule add ../bar/a/b/c ./a/b/c &&
                git submodule init &&
index 9e0d31700e0cf8228e0093f3166ec830a5816ba4..f604ef7a7294b893b4e342d086ac67c760582177 100755 (executable)
@@ -865,9 +865,9 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
         (cd submodule/subsubmodule &&
          git log > ../../expected
         ) &&
-        (cd .git/modules/submodule/modules/subsubmodule
+        (cd .git/modules/submodule/modules/subsubmodule &&
          git log > ../../../../../actual
-        )
+        ) &&
         test_cmp actual expected
        )
 '
@@ -886,7 +886,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '
         git commit -am "pre move" &&
         H2=$(git rev-parse --short HEAD) &&
         git status | sed "s/$H/XXX/" >expect &&
-        H=$(cd submodule2; git rev-parse HEAD) &&
+        H=$(cd submodule2 && git rev-parse HEAD) &&
         git rm --cached submodule2 &&
         rm -rf submodule2 &&
         mkdir -p "moved/sub module" &&
index 08d9add05e0868980f1b59412997e4598e5f9576..34ac28c056bbe8c80178082c770f392bff333fa7 100755 (executable)
@@ -148,7 +148,7 @@ test_expect_success 'preparing second superproject with a nested submodule plus
                cd supersuper &&
                echo "I am super super." >file &&
                git add file &&
-               git commit -m B-super-super-initial
+               git commit -m B-super-super-initial &&
                git submodule add "file://$base_dir/super" subwithsub &&
                git commit -m B-super-super-added &&
                git submodule update --init --recursive &&
index 282ff423318902f908c926af7b6ccab041388262..51646d80197486a19475a144ae8e64b2151b511c 100755 (executable)
@@ -411,8 +411,8 @@ test_expect_success 'sign off (1)' '
        git commit -s -m "thank you" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
        (
-               echo thank you
-               echo
+               echo thank you &&
+               echo &&
                git var GIT_COMMITTER_IDENT |
                sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
        ) >expected &&
@@ -430,9 +430,9 @@ test_expect_success 'sign off (2)' '
 $existing" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
        (
-               echo thank you
-               echo
-               echo $existing
+               echo thank you &&
+               echo &&
+               echo $existing &&
                git var GIT_COMMITTER_IDENT |
                sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
        ) >expected &&
@@ -450,9 +450,9 @@ test_expect_success 'signoff gap' '
 $alt" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
        (
-               echo welcome
-               echo
-               echo $alt
+               echo welcome &&
+               echo &&
+               echo $alt &&
                git var GIT_COMMITTER_IDENT |
                sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
        ) >expected &&
@@ -470,11 +470,11 @@ We have now
 $alt" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
        (
-               echo welcome
-               echo
-               echo We have now
-               echo $alt
-               echo
+               echo welcome &&
+               echo &&
+               echo We have now &&
+               echo $alt &&
+               echo &&
                git var GIT_COMMITTER_IDENT |
                sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
        ) >expected &&
@@ -491,11 +491,11 @@ non-trailer line
 Myfooter: x" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
        (
-               echo subject
-               echo
-               echo non-trailer line
-               echo Myfooter: x
-               echo
+               echo subject &&
+               echo &&
+               echo non-trailer line &&
+               echo Myfooter: x &&
+               echo &&
                echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
        ) >expected &&
        test_cmp expected actual &&
@@ -508,10 +508,10 @@ non-trailer line
 Myfooter: x" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
        (
-               echo subject
-               echo
-               echo non-trailer line
-               echo Myfooter: x
+               echo subject &&
+               echo &&
+               echo non-trailer line &&
+               echo Myfooter: x &&
                echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
        ) >expected &&
        test_cmp expected actual
@@ -524,10 +524,10 @@ test_expect_success 'multiple -m' '
        git commit -m "one" -m "two" -m "three" &&
        git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
        (
-               echo one
-               echo
-               echo two
-               echo
+               echo one &&
+               echo &&
+               echo two &&
+               echo &&
                echo three
        ) >expected &&
        test_cmp expected actual
index b4b74dbe29dd53ae8029cec20be4b6fef2cd6a1e..943708fb04a114bc020d33cbf21b4e4e62e805bd 100755 (executable)
@@ -193,9 +193,9 @@ test_expect_success 'status with added and untracked file in modified submodule
 
 test_expect_success 'setup .git file for sub' '
        (cd sub &&
-        rm -f new-file
+        rm -f new-file &&
         REAL="$(pwd)/../.real" &&
-        mv .git "$REAL"
+        mv .git "$REAL" &&
         echo "gitdir: $REAL" >.git) &&
         echo .real >>.gitignore &&
         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
 
 test_expect_success 'status with a lot of untracked files in the submodule' '
        (
-               cd sub
+               cd sub &&
                i=0 &&
                while test $i -lt 1024
                do
-                       >some-file-$i
-                       i=$(( $i + 1 ))
+                       >some-file-$i &&
+                       i=$(( $i + 1 )) || exit 1
                done
        ) &&
        git status --porcelain sub 2>err.actual &&