t5000-t5999: fix broken &&-chains
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 2 Jul 2018 00:24:01 +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>
14 files changed:
t/t5300-pack-object.sh
t/t5302-pack-index.sh
t/t5401-update-hooks.sh
t/t5500-fetch-pack.sh
t/t5505-remote.sh
t/t5512-ls-remote.sh
t/t5516-fetch-push.sh
t/t5517-push-mirror.sh
t/t5526-fetch-submodules.sh
t/t5531-deep-submodule-push.sh
t/t5543-atomic-push.sh
t/t5601-clone.sh
t/t5605-clone-local.sh
t/t5801-remote-helpers.sh
index 2336d09dcc45f3b808c5e5d6a7c43c8129e8cecc..6c620cd5407537e19507bd92a9cd55b2e54001d8 100755 (executable)
@@ -191,7 +191,7 @@ test_expect_success 'survive missing objects/pack directory' '
                mkdir missing-pack &&
                cd missing-pack &&
                git init &&
-               GOP=.git/objects/pack
+               GOP=.git/objects/pack &&
                rm -fr $GOP &&
                git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
                test -f $GOP/pack-${packname_3}.pack &&
index bb9b8bb3097c05f6e28c37fa24fa27d5bb5b805d..91d51b35f917de2d8b7fc2ebe5f4b9221169abc0 100755 (executable)
@@ -237,7 +237,7 @@ test_expect_success 'running index-pack in the object store' '
     rm -f .git/objects/pack/* &&
     cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&
     (
-       cd .git/objects/pack
+       cd .git/objects/pack &&
        git index-pack pack-${pack1}.pack
     ) &&
     test -f .git/objects/pack/pack-${pack1}.idx
index 7f278d8ce932f34420c337571ec043ffb5e318e9..b5f886a0e264eed3d3ab54176b01912bbb8badb6 100755 (executable)
@@ -82,13 +82,13 @@ test_expect_success 'hooks ran' '
 '
 
 test_expect_success 'pre-receive hook input' '
-       (echo $commit0 $commit1 refs/heads/master;
+       (echo $commit0 $commit1 refs/heads/master &&
         echo $commit1 $commit0 refs/heads/tofail
        ) | test_cmp - victim.git/pre-receive.stdin
 '
 
 test_expect_success 'update hook arguments' '
-       (echo refs/heads/master $commit0 $commit1;
+       (echo refs/heads/master $commit0 $commit1 &&
         echo refs/heads/tofail $commit1 $commit0
        ) | test_cmp - victim.git/update.args
 '
index ea6570e81990d73dc07d03c3bb6e6af5c8f029f4..ebbbbfe05424dd805640180f9dfa41068c1d2d4e 100755 (executable)
@@ -259,7 +259,7 @@ test_expect_success 'clone shallow object count' '
 test_expect_success 'pull in shallow repo with missing merge base' '
        (
                cd shallow &&
-               git fetch --depth 4 .. A
+               git fetch --depth 4 .. A &&
                test_must_fail git merge --allow-unrelated-histories FETCH_HEAD
        )
 '
index 3552b51b4ceb39f95bbd38991ed8f183e6e4d928..11e14a1e0fd591c053e3cb50a1a40e49b2b93e09 100755 (executable)
@@ -844,7 +844,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
                git remote rename origin origin &&
                test_path_is_missing .git/branches/origin &&
                test "$(git config remote.origin.url)" = "quux" &&
-               test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin"
+               test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin" &&
                test "$(git config remote.origin.push)" = "HEAD:refs/heads/foom"
        )
 '
index 6a949484d090ea2df02603f9d82bf4f203a799e9..ea020040e858de0c65759e299ce9cf646573fc63 100755 (executable)
@@ -15,7 +15,7 @@ test_expect_success setup '
        git tag mark1.10 &&
        git show-ref --tags -d | sed -e "s/ /   /" >expected.tag &&
        (
-               echo "$(git rev-parse HEAD)     HEAD"
+               echo "$(git rev-parse HEAD)     HEAD" &&
                git show-ref -d | sed -e "s/ /  /"
        ) >expected.all &&
 
@@ -105,7 +105,7 @@ test_expect_success 'use branch.<name>.remote if possible' '
        git clone . other.git &&
        (
                cd other.git &&
-               echo "$(git rev-parse HEAD)     HEAD"
+               echo "$(git rev-parse HEAD)     HEAD" &&
                git show-ref    | sed -e "s/ /  /"
        ) >exp &&
 
index a5077d8b7c596523a3b0e0e5e45385e5d7871b9e..bd8f23e4300218fba33a5bea5effa167a2e9155a 100755 (executable)
@@ -923,7 +923,7 @@ test_expect_success 'push into aliased refs (consistent)' '
        (
                cd child1 &&
                git branch foo &&
-               git symbolic-ref refs/heads/bar refs/heads/foo
+               git symbolic-ref refs/heads/bar refs/heads/foo &&
                git config receive.denyCurrentBranch false
        ) &&
        (
@@ -945,7 +945,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '
        (
                cd child1 &&
                git branch foo &&
-               git symbolic-ref refs/heads/bar refs/heads/foo
+               git symbolic-ref refs/heads/bar refs/heads/foo &&
                git config receive.denyCurrentBranch false
        ) &&
        (
@@ -1011,7 +1011,7 @@ test_expect_success 'push --porcelain rejected' '
        mk_empty testrepo &&
        git push testrepo refs/heads/master:refs/remotes/origin/master &&
        (cd testrepo &&
-               git reset --hard origin/master^
+               git reset --hard origin/master^ &&
                git config receive.denyCurrentBranch true) &&
 
        echo >.git/foo  "To testrepo"  &&
@@ -1025,7 +1025,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
        mk_empty testrepo &&
        git push testrepo refs/heads/master:refs/remotes/origin/master &&
        (cd testrepo &&
-               git reset --hard origin/master
+               git reset --hard origin/master &&
                git config receive.denyCurrentBranch true) &&
 
        echo >.git/foo  "To testrepo"  &&
@@ -1333,7 +1333,7 @@ test_expect_success 'push --follow-tag only pushes relevant tags' '
                git commit --allow-empty -m "future commit" &&
                git tag -m "future" future &&
                git checkout master &&
-               git for-each-ref refs/heads/master refs/tags/tag >../expect
+               git for-each-ref refs/heads/master refs/tags/tag >../expect &&
                git push --follow-tag ../dst master
        ) &&
        (
index 02f160aae0c414411572a99a148d2b039c24fdd3..c05a661400c10cb7574173b34116362d501481ce 100755 (executable)
@@ -71,7 +71,7 @@ test_expect_success 'push mirror force updates existing branches' '
                git push --mirror up &&
                echo two >foo && git add foo && git commit -m two &&
                git push --mirror up &&
-               git reset --hard HEAD^
+               git reset --hard HEAD^ &&
                git push --mirror up
        ) &&
        master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
@@ -88,7 +88,7 @@ test_expect_success 'push mirror removes branches' '
                echo one >foo && git add foo && git commit -m one &&
                git branch remove master &&
                git push --mirror up &&
-               git branch -D remove
+               git branch -D remove &&
                git push --mirror up
        ) &&
        (
@@ -170,7 +170,7 @@ test_expect_success 'push mirror force updates existing tags' '
                echo two >foo && git add foo && git commit -m two &&
                git tag -f tmaster master &&
                git push --mirror up &&
-               git reset --hard HEAD^
+               git reset --hard HEAD^ &&
                git tag -f tmaster master &&
                git push --mirror up
        ) &&
@@ -188,7 +188,7 @@ test_expect_success 'push mirror removes tags' '
                echo one >foo && git add foo && git commit -m one &&
                git tag -f tremove master &&
                git push --mirror up &&
-               git tag -d tremove
+               git tag -d tremove &&
                git push --mirror up
        ) &&
        (
@@ -235,7 +235,7 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '
                git branch keep master &&
                git branch remove master &&
                git push up &&
-               git branch -D remove
+               git branch -D remove &&
                git push up
        ) &&
        (
index 359e03ff836cf6ac087c83c5b7abe7365ecb4447..0f730d7781568861564b44d534bad728095ac71d 100755 (executable)
@@ -379,7 +379,7 @@ test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necess
                        git config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false
                ) &&
                git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&
-               git config --unset fetch.recurseSubmodules
+               git config --unset fetch.recurseSubmodules &&
                (
                        cd submodule &&
                        git config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive
index 39cb2c1c3489c25545ab3cd69706c0a21378c6b7..e2c37fd9785d2a47f85853a3611006609381c54c 100755 (executable)
@@ -354,7 +354,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs
        git clone a a1 &&
        (
                cd a1 &&
-               git init b
+               git init b &&
                (
                        cd b &&
                        >junk &&
index 3480b33007de4d0b3a73afb634aee176f3faa3c7..7079bcf9a0567e926a37031dd56711a0b093d712 100755 (executable)
@@ -178,7 +178,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus
 test_expect_success 'atomic push is not advertised if configured' '
        mk_repo_pair &&
        (
-               cd upstream
+               cd upstream &&
                git config receive.advertiseatomic 0
        ) &&
        (
index 0b620377448bc3b97d39d2b6beceb4d185edb7ba..ddaa96ac4f44a4e4799aa509b3bd69bc28628d60 100755 (executable)
@@ -618,7 +618,7 @@ hex2oct () {
 test_expect_success 'clone on case-insensitive fs' '
        git init icasefs &&
        (
-               cd icasefs
+               cd icasefs &&
                o=$(git hash-object -w --stdin </dev/null | hex2oct) &&
                t=$(printf "100644 X\0${o}100644 x\0${o}" |
                        git hash-object -w -t tree --stdin) &&
index 3c087e907c4fbe6d8a05854f1d1051a9f9afec7c..af23419ebfc15dc94fd3fa631ea72016ccf2104b 100755 (executable)
@@ -94,7 +94,7 @@ test_expect_success 'clone empty repository' '
         git config receive.denyCurrentBranch warn) &&
        git clone empty empty-clone &&
        test_tick &&
-       (cd empty-clone
+       (cd empty-clone &&
         echo "content" >> foo &&
         git add foo &&
         git commit -m "Initial commit" &&
index 362b1581e092826400d78515cdc8d5cb0f7cfc29..ee5757966f597637a3f9f1602a9ef4bd7ffd908d 100755 (executable)
@@ -96,7 +96,7 @@ test_expect_success 'push new branch with old:new refspec' '
 
 test_expect_success 'push new branch with HEAD:new refspec' '
        (cd local &&
-        git checkout new-name
+        git checkout new-name &&
         git push origin HEAD:new-refspec-2
        ) &&
        compare_refs local HEAD server refs/heads/new-refspec-2