t: fix trivial &&-chain breakage
authorJeff King <peff@peff.net>
Fri, 20 Mar 2015 10:07:15 +0000 (06:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2015 17:20:14 +0000 (10:20 -0700)
These are tests which are missing a link in their &&-chain,
but during a setup phase. We may fail to notice failure in
commands that build the test environment, but these are
typically not expected to fail at all (but it's still good
to double-check that our test environment is what we
expect).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
43 files changed:
t/annotate-tests.sh
t/t0000-basic.sh
t/t0011-hashmap.sh
t/t0201-gettext-fallbacks.sh
t/t1006-cat-file.sh
t/t3010-ls-files-killed-modified.sh
t/t3404-rebase-interactive.sh
t/t3405-rebase-malformed.sh
t/t3425-rebase-topology-merges.sh
t/t3600-rm.sh
t/t4014-format-patch.sh
t/t4041-diff-submodule-option.sh
t/t4049-diff-stat-count.sh
t/t4054-diff-bogus-tree.sh
t/t5500-fetch-pack.sh
t/t5510-fetch.sh
t/t5526-fetch-submodules.sh
t/t5531-deep-submodule-push.sh
t/t5533-push-cas.sh
t/t5541-http-push-smart.sh
t/t5550-http-fetch-dumb.sh
t/t5551-http-fetch-smart.sh
t/t6000-rev-list-misc.sh
t/t6006-rev-list-format.sh
t/t6022-merge-rename.sh
t/t6036-recursive-corner-cases.sh
t/t6111-rev-list-treesame.sh
t/t6200-fmt-merge-msg.sh
t/t7004-tag.sh
t/t7006-pager.sh
t/t7009-filter-branch-null-sha1.sh
t/t7400-submodule-basic.sh
t/t7406-submodule-update.sh
t/t7508-status.sh
t/t7510-signed-commit.sh
t/t7600-merge.sh
t/t7612-merge-verify-signatures.sh
t/t8003-blame-corner-cases.sh
t/t8008-blame-formats.sh
t/t9001-send-email.sh
t/t9300-fast-import.sh
t/t9500-gitweb-standalone-no-errors.sh
t/t9903-bash-prompt.sh
index 071e4d7d3ee9729b5caeb34ffd54ae88b7e1e0d8..f5c01758ca38b58fc10e30cfac81be5becb0316b 100644 (file)
@@ -405,7 +405,7 @@ test_expect_success 'setup -L :regex' '
        mv hello.c hello.orig &&
        echo "#include <stdio.h>" >hello.c &&
        cat hello.orig >>hello.c &&
-       tr Q "\\t" >>hello.c <<-\EOF
+       tr Q "\\t" >>hello.c <<-\EOF &&
        void mail()
        {
        Qputs("mail");
index f10ba4a01e7e9468b9656ee54486209151ecfd4f..79b9074172ce00771c92a8f3cda35ebf4ac24d89 100755 (executable)
@@ -253,7 +253,7 @@ test_expect_success 'test --verbose' '
        test_expect_success "failing test" false
        test_done
        EOF
-       mv test-verbose/out test-verbose/out+
+       mv test-verbose/out test-verbose/out+ &&
        grep -v "^Initialized empty" test-verbose/out+ >test-verbose/out &&
        check_sub_test_lib_test test-verbose <<-\EOF
        > expecting success: true
@@ -974,7 +974,7 @@ test_expect_success 'writing this tree with --missing-ok' '
 
 ################################################################
 test_expect_success 'git read-tree followed by write-tree should be idempotent' '
-       rm -f .git/index
+       rm -f .git/index &&
        git read-tree $tree &&
        test -f .git/index &&
        newtree=$(git write-tree) &&
index f97c80556fac55ae1bc11d24712be21a9dac0dcf..9c217d948c14dfd75f73e27a0911fd194eb11bce 100755 (executable)
@@ -218,7 +218,7 @@ test_expect_success 'grow / shrink' '
        echo size >> in &&
        echo 64 51 >> expect &&
        echo put key52 value52 >> in &&
-       echo NULL >> expect
+       echo NULL >> expect &&
        echo size >> in &&
        echo 256 52 >> expect &&
        for n in $(test_seq 12)
index 00c6d3d9b11a7966c04f42cdb06e9cff258814fb..90da1c7ddc41b73dc07b4433255d3b0ffd66bd5d 100755 (executable)
@@ -50,7 +50,7 @@ test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate v
 
 test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables with spaces' '
     cmdline="git am" &&
-    export cmdline;
+    export cmdline &&
     printf "When you have resolved this problem, run git am --resolved." >expect &&
     eval_gettext "When you have resolved this problem, run \$cmdline --resolved." >actual &&
     test_i18ncmp expect actual
@@ -58,7 +58,7 @@ test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate v
 
 test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables with spaces and quotes' '
     cmdline="git am" &&
-    export cmdline;
+    export cmdline &&
     printf "When you have resolved this problem, run \"git am --resolved\"." >expect &&
     eval_gettext "When you have resolved this problem, run \"\$cmdline --resolved\"." >actual &&
     test_i18ncmp expect actual
index a72e700ae434b07b08b48a68d4c0ebaa8173002b..ab36b1eb72ffc4a54240b37e908cc994756f2f26 100755 (executable)
@@ -274,7 +274,7 @@ test_expect_success 'setup blobs which are likely to delta' '
 '
 
 test_expect_success 'confirm that neither loose blob is a delta' '
-       cat >expect <<-EOF
+       cat >expect <<-EOF &&
        $_z40
        $_z40
        EOF
index ea6a6783777a9f7f163999eb4767d7d143382e02..62fce103f9cc2509c642fd5c900dc0b60b1710d9 100755 (executable)
@@ -62,7 +62,7 @@ test_expect_success 'git update-index --add to add various paths.' '
                        cd submod$i && git commit --allow-empty -m "empty $i"
                ) || break
        done &&
-       git update-index --add submod[12]
+       git update-index --add submod[12] &&
        (
                cd submod1 &&
                git commit --allow-empty -m "empty 1 (updated)"
index edad20df387735633fc5e583d64242ae28adb31d..eed76cca55ce655cb51c793f21cd5ebbd363ba85 100755 (executable)
@@ -1007,7 +1007,7 @@ test_expect_success 'rebase -i with --strategy and -X' '
 '
 
 test_expect_success 'rebase -i error on commits with \ in message' '
-       current_head=$(git rev-parse HEAD)
+       current_head=$(git rev-parse HEAD) &&
        test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" &&
        test_commit TO-REMOVE will-conflict old-content &&
        test_commit "\temp" will-conflict new-content dummy &&
index 19eddadcf734951b22246c6dd0a16d517f111b5b..ff8c360cd58bc11366ac2cf9e7c0b141e4ac3a39 100755 (executable)
@@ -24,7 +24,7 @@ test_expect_success setup '
        git add file1 file2 &&
        test_tick &&
        git commit -m "Initial commit" &&
-       git branch diff-in-message
+       git branch diff-in-message &&
 
        git checkout -b multi-line-subject &&
        cat F >file2 &&
@@ -36,7 +36,7 @@ test_expect_success setup '
 
        git checkout diff-in-message &&
        echo "commit log message containing a diff" >G &&
-       echo "" >>G
+       echo "" >>G &&
        cat G >file2 &&
        git add file2 &&
        git diff --cached >>G &&
index 1d195fbd64cc9d6de3f94e69e4fbe9b97be38089..846f85c27e97642972dff7168ab2aeed49988fad 100755 (executable)
@@ -24,7 +24,7 @@ test_expect_success 'setup of non-linear-history' '
        test_commit c &&
        git checkout b &&
        test_commit d &&
-       test_commit e
+       test_commit e &&
 
        git checkout c &&
        test_commit g &&
@@ -33,7 +33,7 @@ test_expect_success 'setup of non-linear-history' '
        cherry_pick gp g &&
        test_commit i &&
        git checkout b &&
-       test_commit f
+       test_commit f &&
 
        git checkout d &&
        test_commit n &&
index b0db89b734885659ac21efb2cbc6c41b834082db..1962989971a0a5ca8b179ae9315c29a0ab86cd8d 100755 (executable)
@@ -183,7 +183,7 @@ test_expect_success 'refuse to remove cached empty file with modifications' '
 
 test_expect_success 'remove intent-to-add file without --force' '
        echo content >intent-to-add &&
-       git add -N intent-to-add
+       git add -N intent-to-add &&
        git rm --cached intent-to-add
 '
 
@@ -201,7 +201,7 @@ test_expect_success 'Recursive without -r fails' '
 '
 
 test_expect_success 'Recursive with -r but dirty' '
-       echo qfwfq >>frotz/nitfol
+       echo qfwfq >>frotz/nitfol &&
        test_must_fail git rm -r frotz &&
        test -d frotz &&
        test -f frotz/nitfol
index 256affce89517a707f9054d2c9643db4f5398832..c39e50028f256b6850327b90aa1137bd8e35ef1a 100755 (executable)
@@ -802,7 +802,7 @@ test_expect_success '--no-signature suppresses format.signaturefile ' '
 '
 
 test_expect_success '--signature-file overrides format.signaturefile' '
-       cat >other-mail-signature <<-\EOF
+       cat >other-mail-signature <<-\EOF &&
        Use this other signature instead of mail-signature.
        EOF
        test_config format.signaturefile mail-signature &&
index ff6134147749a7104cd76dc2659be7e6da8b06e2..2d9731b52d6b880d742e4722ddcc404c59e5f1bd 100755 (executable)
@@ -528,10 +528,12 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
                sha1_before=$(git rev-parse --short HEAD)
                echo b >b &&
                git add b &&
-               git commit -m b
-               sha1_after=$(git rev-parse --short HEAD)
-               echo "Submodule sub $sha1_before..$sha1_after:
-  > b" >../expected
+               git commit -m b &&
+               sha1_after=$(git rev-parse --short HEAD) &&
+               {
+                       echo "Submodule sub $sha1_before..$sha1_after:" &&
+                       echo "  > b"
+               } >../expected
        ) &&
        (cd super &&
                (cd sub &&
index 5b594e878f7561560fb2a8563b7355a32d4d3914..a34121740a4ab58e8abd16b3a00df5f44d2f1648 100755 (executable)
@@ -18,7 +18,7 @@ test_expect_success 'mode-only change show as a 0-line change' '
        test_chmod +x b d &&
        echo a >a &&
        echo c >c &&
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
         a | 1 +
         b | 0
         ...
@@ -33,7 +33,7 @@ test_expect_success 'binary changes do not count in lines' '
        echo a >a &&
        echo c >c &&
        cat "$TEST_DIRECTORY"/test-binary-1.png >d &&
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
         a | 1 +
         c | 1 +
         ...
@@ -55,7 +55,7 @@ test_expect_success 'exclude unmerged entries from total file count' '
        done |
        git update-index --index-info &&
        echo d >d &&
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
         a | 1 +
         b | 1 +
         ...
index 0843c8789005e21eff2f771c97671f02cbaee022..1d6efab3c53f673298c4e1911fd1cb4756be59f6 100755 (executable)
@@ -16,7 +16,7 @@ test_expect_success 'create bogus tree' '
 test_expect_success 'create tree with matching file' '
        echo bar >foo &&
        git add foo &&
-       good_tree=$(git write-tree)
+       good_tree=$(git write-tree) &&
        blob=$(git rev-parse :foo)
 '
 
index bd37f040b6ce13406ef009944d46d2f1cc6c8d7b..692d71738b15eac20029a7ce667db9d398d944d0 100755 (executable)
@@ -414,7 +414,7 @@ test_expect_success 'setup tests for the --stdin parameter' '
        do
                git tag $head $head
        done &&
-       cat >input <<-\EOF
+       cat >input <<-\EOF &&
        refs/heads/C
        refs/heads/A
        refs/heads/D
index d3fa2c9617eefa0fd8a34fe0e7d9bfffd439c6bd..0ba9db08847255d28e3e185d18b68703fb0755dc 100755 (executable)
@@ -596,7 +596,7 @@ test_configured_prune () {
                        test_unconfig remote.origin.prune &&
                        git fetch &&
                        git rev-parse --verify refs/remotes/origin/newbranch
-               )
+               ) &&
 
                # now remove it
                git branch -d newbranch &&
index ca5b027c557014cff85ca4ba7d118db578a57256..a4532b00d6cbf791a6654b00742138728d4bf66d 100755 (executable)
@@ -216,7 +216,7 @@ test_expect_success "Recursion stops when no new submodule commits are fetched"
        head2=$(git rev-parse --short HEAD) &&
        echo "Fetching submodule submodule" > expect.out.sub &&
        echo "From $pwd/." > expect.err.sub &&
-       echo "   $head1..$head2  master     -> origin/master" >> expect.err.sub
+       echo "   $head1..$head2  master     -> origin/master" >>expect.err.sub &&
        head -2 expect.err >> expect.err.sub &&
        (
                cd downstream &&
@@ -315,7 +315,7 @@ test_expect_success "'--recurse-submodules=on-demand' doesn't recurse when no ne
                ) &&
                head1=$(git rev-parse --short HEAD^) &&
                git add subdir/deepsubmodule &&
-               git commit -m "new deepsubmodule"
+               git commit -m "new deepsubmodule" &&
                head2=$(git rev-parse --short HEAD) &&
                echo "From $pwd/submodule" > ../expect.err.sub &&
                echo "   $head1..$head2  master     -> origin/master" >> ../expect.err.sub
@@ -337,7 +337,7 @@ test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necess
        head2=$(git rev-parse --short HEAD) &&
        tail -2 expect.err > expect.err.deepsub &&
        echo "From $pwd/." > expect.err &&
-       echo "   $head1..$head2  master     -> origin/master" >> expect.err
+       echo "   $head1..$head2  master     -> origin/master" >>expect.err &&
        cat expect.err.sub >> expect.err &&
        cat expect.err.deepsub >> expect.err &&
        (
@@ -387,7 +387,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config
        git commit -m "new submodule" &&
        head2=$(git rev-parse --short HEAD) &&
        echo "From $pwd/." > expect.err.2 &&
-       echo "   $head1..$head2  master     -> origin/master" >> expect.err.2
+       echo "   $head1..$head2  master     -> origin/master" >>expect.err.2 &&
        head -2 expect.err >> expect.err.2 &&
        (
                cd downstream &&
@@ -415,7 +415,7 @@ test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' override
        git commit -m "new submodule" &&
        head2=$(git rev-parse --short HEAD) &&
        echo "From $pwd/." > expect.err.2 &&
-       echo "   $head1..$head2  master     -> origin/master" >> expect.err.2
+       echo "   $head1..$head2  master     -> origin/master" >>expect.err.2 &&
        head -2 expect.err >> expect.err.2 &&
        (
                cd downstream &&
index 445bb5fe26a4d8edc29223b1216625d484cd01bf..6507487c1a43bb407ed7598551364c4eb5a60cc6 100755 (executable)
@@ -104,7 +104,7 @@ test_expect_success 'push fails when commit on multiple branches if one branch h
 '
 
 test_expect_success 'push succeeds if submodule has no remote and is on the first superproject commit' '
-       git init --bare a
+       git init --bare a &&
        git clone a a1 &&
        (
                cd a1 &&
index ba20d83333155b824506c33014019c1ce8868d68..dccf8a672ebb1247162b1c877d3a4fa729be2670 100755 (executable)
@@ -159,7 +159,7 @@ test_expect_success 'cover everything with default force-with-lease (protected)'
        (
                cd src &&
                git branch naster master^
-       )
+       ) &&
        git ls-remote src refs/heads/\* >expect &&
        (
                cd dst &&
@@ -174,7 +174,7 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '
        (
                cd src &&
                git branch naster master^
-       )
+       ) &&
        (
                cd dst &&
                git fetch &&
index d2c681ebfde39fcccef190c3a242dfae9d8af2f2..47cee537c7a9699611b0eb4842936957029a83e4 100755 (executable)
@@ -158,7 +158,7 @@ test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
 test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
        # create a dissimilarly-named remote ref so that git is unable to match the
        # two refs (viz. local, remote) unless an explicit refspec is provided.
-       git push origin master:retsam
+       git push origin master:retsam &&
 
        echo "change changed" > path2 &&
        git commit -a -m path2 --amend &&
index 2731ad4cea951744ea82b94a038a71ef01a228a2..61e087ed6af680735ffc2446fd34d83fd6f0b939 100755 (executable)
@@ -15,7 +15,7 @@ test_expect_success 'setup repository' '
        git config push.default matching &&
        echo content1 >file &&
        git add file &&
-       git commit -m one
+       git commit -m one &&
        echo content2 >file &&
        git add file &&
        git commit -m two
index ef2feea0ab115f9ca94f72f55fcd2d082629f7a0..cf0a6ea538949e8fe1c11a7237b241284481030a 100755 (executable)
@@ -83,7 +83,7 @@ test_expect_success 'clone http repository' '
 test_expect_success 'fetch changes via http' '
        echo content >>file &&
        git commit -a -m two &&
-       git push public
+       git push public &&
        (cd clone && git pull) &&
        test_cmp file clone/file
 '
index 2602086303edeae192606d82d7fd1e71ac76534f..7911ed9af6729de9263e5c958eda684a39bf3919 100755 (executable)
@@ -42,7 +42,7 @@ test_expect_success 'rev-list --objects with pathspecs and copied files' '
        test_tick &&
        git commit -m that &&
 
-       ONE=$(git rev-parse HEAD:one)
+       ONE=$(git rev-parse HEAD:one) &&
        git rev-list --objects HEAD two >output &&
        grep "$ONE two/three" output &&
        ! grep one output
@@ -85,7 +85,7 @@ test_expect_success 'rev-list can show index objects' '
        #   - we do not show the root tree; since we updated the index, it
        #     does not have a valid cache tree
        #
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
        8e4020bb5a8d8c873b25de15933e75cc0fc275df one
        d9d3a7417b9605cfd88ee6306b28dadc29e6ab08 only-in-index
        9200b628cf9dc883a85a7abc8d6e6730baee589c two
index a02a45afd2087debba99e40996b689eac5495191..2b7c0f0c67e0b3c1f6974a81401ead4696187cdd 100755 (executable)
@@ -45,7 +45,7 @@ test_expect_success 'setup' '
        head2=$(git rev-parse --verify HEAD) &&
        head2_short=$(git rev-parse --verify --short $head2) &&
        tree2=$(git rev-parse --verify HEAD:) &&
-       tree2_short=$(git rev-parse --verify --short $tree2)
+       tree2_short=$(git rev-parse --verify --short $tree2) &&
        git config --unset i18n.commitEncoding
 '
 
index a89dfbef08a5a9ff2d4c8727b67b44279fe522e5..05ebba7afa29977196370d178af728ec1d0d9a81 100755 (executable)
@@ -685,7 +685,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '
        git add -A &&
        git commit -mA &&
 
-       git checkout -b side
+       git checkout -b side &&
        git rm -rf df &&
        git commit -mB &&
 
@@ -716,7 +716,7 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '
        git add -A &&
        git commit -mA &&
 
-       git checkout -b side
+       git checkout -b side &&
        git rm -f file &&
        git commit -m "Delete file" &&
 
@@ -745,7 +745,7 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '
        git add -A &&
        git commit -mA &&
 
-       git checkout -b side
+       git checkout -b side &&
        cp file newfile &&
        git add -A &&
        git commit -m "Add file copy" &&
index b43d031d63924464efc62c89d0ce0da017f762b1..8923b04e60b681d25d874106d8ce223e5349e73d 100755 (executable)
@@ -86,7 +86,7 @@ test_expect_success 'setup criss-cross + rename merges with basic modification'
        rm -rf .git &&
        git init &&
 
-       ten="0 1 2 3 4 5 6 7 8 9"
+       ten="0 1 2 3 4 5 6 7 8 9" &&
        for i in $ten
        do
                echo line $i in a sample file
index 88b84dfa7315ec8e3b41586ad9cd3e43810babd8..45e36736e4269476f0cbe6fa5b70965cb5653040 100755 (executable)
@@ -58,7 +58,7 @@ test_expect_success setup '
 
        git checkout master &&
        test_tick && git merge --no-ff fiddler-branch &&
-       note K
+       note K &&
 
        test_commit "file=Part 1" file "Part 1" L &&
 
index 54b5744cc526e172acb79bb204af1800fdceb315..2e2fb0e9572f3d570311470aebf47da37974b8f8 100755 (executable)
@@ -194,7 +194,7 @@ test_expect_success '--log=5 with custom comment character' '
 '
 
 test_expect_success 'merge.log=0 disables shortlog' '
-       echo "Merge branch ${apos}left${apos}" >expected
+       echo "Merge branch ${apos}left${apos}" >expected &&
        git -c merge.log=0 fmt-merge-msg <.git/FETCH_HEAD >actual &&
        test_cmp expected actual
 '
index 35c805a44e817c637c667b1d1d14d97b4ee46803..347d3bebbcdd91a5bdfa4f9c136c03753a1eab42 100755 (executable)
@@ -1180,7 +1180,7 @@ test_expect_success 'message in editor has initial comment: first line' '
 test_expect_success \
        'message in editor has initial comment: remainder' '
        # remove commented lines from the remainder -- should be empty
-       >rest.expect
+       >rest.expect &&
        sed -e 1d -e '/^#/d' <actual >rest.actual &&
        test_cmp rest.expect rest.actual
 '
index da958a8b569e6e8ad0c4d2e20b0454a0180155cc..947b690fd7fcaae6f2584b0752adfecfc0c1af89 100755 (executable)
@@ -396,7 +396,7 @@ test_expect_success TTY 'command-specific pager overrides core.pager' '
        sane_unset PAGER GIT_PAGER &&
        echo "foo:initial" >expect &&
        >actual &&
-       test_config core.pager "exit 1"
+       test_config core.pager "exit 1" &&
        test_config pager.log "sed s/^/foo:/ >actual" &&
        test_terminal git log --format=%s -1 &&
        test_cmp expect actual
index a997f7ac3a44c2e47274b59568370ebb607fff31..c27f90f285faf0529f08fae7262a40b605bd7375 100755 (executable)
@@ -13,7 +13,7 @@ test_expect_success 'setup: a commit with a bogus null sha1 in the tree' '
        {
                git ls-tree HEAD &&
                printf "160000 commit $_z40\\tbroken\\n"
-       } >broken-tree
+       } >broken-tree &&
        echo "add broken entry" >msg &&
 
        tree=$(git mktree <broken-tree) &&
index 5811a982f472e3b79f31cc50dcdef92dcdb4a58c..540771ca419b82e4dd32adf986545515fa1db66e 100755 (executable)
@@ -766,7 +766,7 @@ test_expect_success 'moving the superproject does not break submodules' '
        (
                cd addtest &&
                git submodule status >expect
-       )
+       ) &&
        mv addtest addtest2 &&
        (
                cd addtest2 &&
@@ -987,7 +987,7 @@ test_expect_success 'submodule with UTF-8 name' '
 
 test_expect_success 'submodule add clone shallow submodule' '
        mkdir super &&
-       pwd=$(pwd)
+       pwd=$(pwd) &&
        (
                cd super &&
                git init &&
index 29d3d2cca03d733245ab4d84899f10e78d542573..dda3929d99aea3ea30d30b5715532fe6184d5259 100755 (executable)
@@ -754,7 +754,7 @@ test_expect_success SYMLINKS 'submodule update can handle symbolic links in pwd'
 
 test_expect_success 'submodule update clone shallow submodule' '
        git clone cloned super3 &&
-       pwd=$(pwd)
+       pwd=$(pwd) &&
        (cd super3 &&
         sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
         mv -f .gitmodules.tmp .gitmodules &&
index 6b16bcb64031e32c7200deac8ceb46711a8e7bed..0f9ad4c7e223cfbd5df8552cf19d70e9a6a74296 100755 (executable)
@@ -431,7 +431,7 @@ test_expect_success 'status -s -uno' '
 '
 
 test_expect_success 'status -s (status.showUntrackedFiles no)' '
-       git config status.showuntrackedfiles no
+       git config status.showuntrackedfiles no &&
        git status -s >output &&
        test_cmp expect output
 '
@@ -465,7 +465,7 @@ EOF
 '
 
 test_expect_success 'status (status.showUntrackedFiles normal)' '
-       test_config status.showuntrackedfiles normal
+       test_config status.showuntrackedfiles normal &&
        git status >output &&
        test_i18ncmp expect output
 '
@@ -485,7 +485,7 @@ test_expect_success 'status -s -unormal' '
 '
 
 test_expect_success 'status -s (status.showUntrackedFiles normal)' '
-       git config status.showuntrackedfiles normal
+       git config status.showuntrackedfiles normal &&
        git status -s >output &&
        test_cmp expect output
 '
@@ -520,7 +520,7 @@ EOF
 '
 
 test_expect_success 'status (status.showUntrackedFiles all)' '
-       test_config status.showuntrackedfiles all
+       test_config status.showuntrackedfiles all &&
        git status >output &&
        test_i18ncmp expect output
 '
index 474dab381aef027207026cb938df7a09cc7a9056..fc1ff452833749ad727f27f4c88ab3b174421ee7 100755 (executable)
@@ -42,7 +42,7 @@ test_expect_success GPG 'create signed commits' '
        git tag seventh-unsigned &&
 
        test_tick && git rebase -f HEAD^^ && git tag sixth-signed HEAD^ &&
-       git tag seventh-signed
+       git tag seventh-signed &&
 
        echo 8 >file && test_tick && git commit -a -m eighth -SB7227189 &&
        git tag eighth-signed-alt
index b16462132fd01f21cfd2af40a3c769803b0b7c50..75c50eea15e54995364fb8c81d0760446175f46e 100755 (executable)
@@ -133,7 +133,7 @@ test_expect_success 'setup' '
        test_tick &&
        git commit -m "commit 3" &&
        git tag c3 &&
-       c3=$(git rev-parse HEAD)
+       c3=$(git rev-parse HEAD) &&
        git reset --hard "$c0" &&
        create_merge_msgs
 '
index 21a0bf8fb8c4946f625b317a9d60aa05bb0acb65..8ae69a61c33a2691a142759f45a8addd36322343 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success GPG 'create signed commits' '
 
        git checkout -b side-untrusted &&
        echo 3 >baz && git add baz &&
-       test_tick && git commit -SB7227189 -m "untrusted on side"
+       test_tick && git commit -SB7227189 -m "untrusted on side" &&
 
        git checkout master
 '
index 2a3469bcbea39e832ab44280bb1223fc4ee20b61..32895e5acba8d246539d3bd97fe7305827f18aa7 100755 (executable)
@@ -26,7 +26,7 @@ test_expect_success setup '
        cat one >uno &&
        mv two dos &&
        cat one >>tres &&
-       echo DEF >>mouse
+       echo DEF >>mouse &&
        git add uno dos tres mouse &&
        test_tick &&
        GIT_AUTHOR_NAME=Second git commit -a -m Second &&
@@ -153,15 +153,15 @@ test_expect_success 'blame path that used to be a directory' '
 '
 
 test_expect_success 'blame to a commit with no author name' '
-  TREE=`git rev-parse HEAD:`
-  cat >badcommit <<EOF
+  TREE=`git rev-parse HEAD:` &&
+  cat >badcommit <<EOF &&
 tree $TREE
 author <noname> 1234567890 +0000
 committer David Reiss <dreiss@facebook.com> 1234567890 +0000
 
 some message
 EOF
-  COMMIT=`git hash-object -t commit -w badcommit`
+  COMMIT=`git hash-object -t commit -w badcommit` &&
   git --no-pager blame $COMMIT -- uno >/dev/null
 '
 
index d15f8b3d473416eaed24ed92396d567aa785c3d8..29f84a6dd17752aabc76ee3d84d1c6b1064481ba 100755 (executable)
@@ -5,7 +5,7 @@ test_description='blame output in various formats on a simple case'
 
 test_expect_success 'setup' '
        echo a >file &&
-       git add file
+       git add file &&
        test_tick &&
        git commit -m one &&
        echo b >>file &&
index 051305545c414481b6883fa619ffb39134187de0..37caa183e0020f2aef14d0f957ea0b064d11271d 100755 (executable)
@@ -1325,7 +1325,7 @@ test_expect_success $PREREQ 'sendemail.transferencoding=7bit fails on 8bit data'
 
 test_expect_success $PREREQ '--transfer-encoding overrides sendemail.transferEncoding' '
        clean_fake_sendmail &&
-       git config sendemail.transferEncoding 8bit
+       git config sendemail.transferEncoding 8bit &&
        test_must_fail git send-email \
                --transfer-encoding=7bit \
                --smtp-server="$(pwd)/fake.sendmail" \
index 6bd5a005ecb46f5e72fb257988236e75cdcd49e5..584b5383d8eae8692f2e5f7c0b1c61644506f8f4 100755 (executable)
@@ -1132,7 +1132,7 @@ test_expect_success \
         compare_diff_raw expect actual'
 
 test_expect_success PIPE 'N: read and copy directory' '
-       cat >expect <<-\EOF
+       cat >expect <<-\EOF &&
        :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100   file2/newf      file3/newf
        :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100   file2/oldf      file3/oldf
        EOF
index e74b9ab1e16a9255afad32de380b69aa9e76db47..f9f078e7b705eda275f1a1ed8642b81aecf01a53 100755 (executable)
@@ -297,7 +297,7 @@ test_expect_success 'setup incomplete lines' '
        echo "Dominus regit me," >file &&
        echo "incomplete line" | tr -d "\\012" >>file &&
        git commit -a -m "Change incomplete line" &&
-       git tag incomplete_lines_chg
+       git tag incomplete_lines_chg &&
        echo "Dominus regit me," >file &&
        git commit -a -m "Remove incomplete line" &&
        git tag incomplete_lines_rem
index 51ecd3e4c157ea267557a4484d574748b9757bd4..0c6acddc1b9e6fbf155e735749cd67f21d0ebaaf 100755 (executable)
@@ -166,7 +166,7 @@ test_expect_success 'prompt - inside bare repository' '
 '
 
 test_expect_success 'prompt - interactive rebase' '
-       printf " (b1|REBASE-i 2/3)" >expected
+       printf " (b1|REBASE-i 2/3)" >expected &&
        write_script fake_editor.sh <<-\EOF &&
                echo "exec echo" >"$1"
                echo "edit $(git log -1 --format="%h")" >>"$1"