t1000-t1999: fix broken &&-chains
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 2 Jul 2018 00:23:56 +0000 (20:23 -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/t1004-read-tree-m-u-wf.sh
t/t1005-read-tree-reset.sh
t/t1020-subdirectory.sh
t/t1050-large.sh
t/t1411-reflog-show.sh
t/t1512-rev-parse-disambiguation.sh
index 826cd32e231607e3cd46f9c0314908583c01a093..c13578a635fbcf8b33c1cf912df69afa23e96885 100755 (executable)
@@ -210,10 +210,10 @@ test_expect_success 'D/F' '
        read_tree_u_must_succeed -m -u branch-point side-b side-a &&
        git ls-files -u >actual &&
        (
-               a=$(git rev-parse branch-point:subdir/file2)
-               b=$(git rev-parse side-a:subdir/file2/another)
-               echo "100644 $a 1       subdir/file2"
-               echo "100644 $a 2       subdir/file2"
+               a=$(git rev-parse branch-point:subdir/file2) &&
+               b=$(git rev-parse side-a:subdir/file2/another) &&
+               echo "100644 $a 1       subdir/file2" &&
+               echo "100644 $a 2       subdir/file2" &&
                echo "100644 $b 3       subdir/file2/another"
        ) >expect &&
        test_cmp expect actual
index 074568500a357d3bae69a953aa59155687483a10..83b09e1310676cc4ca092ff30c6da50aa6e635fd 100755 (executable)
@@ -33,7 +33,7 @@ test_expect_success 'reset should remove remnants from a failed merge' '
        git ls-files -s >expect &&
        sha1=$(git rev-parse :new) &&
        (
-               echo "100644 $sha1 1    old"
+               echo "100644 $sha1 1    old" &&
                echo "100644 $sha1 3    old"
        ) | git update-index --index-info &&
        >old &&
@@ -48,7 +48,7 @@ test_expect_success 'two-way reset should remove remnants too' '
        git ls-files -s >expect &&
        sha1=$(git rev-parse :new) &&
        (
-               echo "100644 $sha1 1    old"
+               echo "100644 $sha1 1    old" &&
                echo "100644 $sha1 3    old"
        ) | git update-index --index-info &&
        >old &&
@@ -63,7 +63,7 @@ test_expect_success 'Porcelain reset should remove remnants too' '
        git ls-files -s >expect &&
        sha1=$(git rev-parse :new) &&
        (
-               echo "100644 $sha1 1    old"
+               echo "100644 $sha1 1    old" &&
                echo "100644 $sha1 3    old"
        ) | git update-index --index-info &&
        >old &&
@@ -78,7 +78,7 @@ test_expect_success 'Porcelain checkout -f should remove remnants too' '
        git ls-files -s >expect &&
        sha1=$(git rev-parse :new) &&
        (
-               echo "100644 $sha1 1    old"
+               echo "100644 $sha1 1    old" &&
                echo "100644 $sha1 3    old"
        ) | git update-index --index-info &&
        >old &&
@@ -93,7 +93,7 @@ test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' '
        git ls-files -s >expect &&
        sha1=$(git rev-parse :new) &&
        (
-               echo "100644 $sha1 1    old"
+               echo "100644 $sha1 1    old" &&
                echo "100644 $sha1 3    old"
        ) | git update-index --index-info &&
        >old &&
index df3183ea1ab36a46b914333e834093bd50847265..c2df75e4953d897acee5cf590b9c358e5a0b77c2 100755 (executable)
@@ -148,7 +148,7 @@ test_expect_success 'GIT_PREFIX for built-ins' '
        (
                cd dir &&
                echo "change" >two &&
-               GIT_EXTERNAL_DIFF=./diff git diff >../actual
+               GIT_EXTERNAL_DIFF=./diff git diff >../actual &&
                git checkout -- two
        ) &&
        test_cmp expect actual
index f9eb143f43420b0e2f2b864b4f83f78de7886a7b..1a9b21b2934b0a4fae7f74bb8c4da65d32218ca0 100755 (executable)
@@ -108,7 +108,7 @@ test_expect_success 'packsize limit' '
                test-tool genrandom "c" $(( 128 * 1024 )) >mid3 &&
                git add mid1 mid2 mid3 &&
 
-               count=0
+               count=0 &&
                for pi in .git/objects/pack/pack-*.idx
                do
                        test -f "$pi" && count=$(( $count + 1 ))
@@ -116,8 +116,8 @@ test_expect_success 'packsize limit' '
                test $count = 2 &&
 
                (
-                       git hash-object --stdin <mid1
-                       git hash-object --stdin <mid2
+                       git hash-object --stdin <mid1 &&
+                       git hash-object --stdin <mid2 &&
                        git hash-object --stdin <mid3
                ) |
                sort >expect &&
index 596907758d5d47ae8026098a2ce4acd8c01df6aa..4d62ceef9c15cc981bada757bcf7cfa43f2dd9a5 100755 (executable)
@@ -159,9 +159,9 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '
        git log -1 -p HEAD^ >log.one &&
        git log -1 -p HEAD >log.two &&
        (
-               cat log.one; echo
-               cat log.two; echo
-               cat log.one; echo
+               cat log.one && echo &&
+               cat log.two && echo &&
+               cat log.one && echo &&
                cat log.two
        ) >expect &&
        test_cmp expect actual
index 96fe3754c8c96fd65286d4eea44cb65b0edde343..e4d5b56014822ff760d3eab6d7c798f8d932ca45 100755 (executable)
@@ -34,8 +34,8 @@ test_expect_success 'blob and tree' '
                for i in 0 1 2 3 4 5 6 7 8 9
                do
                        echo $i
-               done
-               echo
+               done &&
+               echo &&
                echo b1rwzyc3
        ) >a0blgqsjc &&
 
@@ -222,7 +222,7 @@ test_expect_success 'more history' '
 
        test_might_fail git rm -f a0blgqsjc &&
        (
-               git cat-file blob $side:f5518nwu
+               git cat-file blob $side:f5518nwu &&
                echo j3l0i9s6
        ) >ab2gs879 &&
        git add ab2gs879 &&