]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7406-submodule-update: fix broken &&-chains
authorSZEDER Gábor <szeder.dev@gmail.com>
Sat, 16 Jun 2018 20:33:19 +0000 (22:33 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Jun 2018 16:48:10 +0000 (09:48 -0700)
Three tests in 't7406-submodule-update' contain broken &&-chains, but
since they are all in subshells, chain-lint couldn't notice them.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7406-submodule-update.sh

index 6f083c4d68b677ff4058961311d6f753d3953a54..9e0d31700e0cf8228e0093f3166ec830a5816ba4 100755 (executable)
@@ -65,7 +65,7 @@ test_expect_success 'setup a submodule tree' '
         git commit -m "none"
        ) &&
        git clone . recursivesuper &&
-       ( cd recursivesuper
+       ( cd recursivesuper &&
         git submodule add ../super super
        )
 '
@@ -245,13 +245,13 @@ test_expect_success 'submodule update --remote should fetch upstream changes wit
        (
                cd super &&
                git submodule update --remote --force submodule &&
-               git -C submodule log -1 --oneline >actual
-               git -C ../submodule log -1 --oneline master >expect
+               git -C submodule log -1 --oneline >actual &&
+               git -C ../submodule log -1 --oneline master >expect &&
                test_cmp expect actual &&
                git checkout -b test-branch &&
                git submodule update --remote --force submodule &&
-               git -C submodule log -1 --oneline >actual
-               git -C ../submodule log -1 --oneline test-branch >expect
+               git -C submodule log -1 --oneline >actual &&
+               git -C ../submodule log -1 --oneline test-branch >expect &&
                test_cmp expect actual &&
                git checkout master &&
                git branch -d test-branch &&
@@ -891,7 +891,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '
         rm -rf submodule2 &&
         mkdir -p "moved/sub module" &&
         git update-index --add --cacheinfo 160000 $H "moved/sub module" &&
-        git config -f .gitmodules submodule.submodule2.path "moved/sub module"
+        git config -f .gitmodules submodule.submodule2.path "moved/sub module" &&
         git commit -am "post move" &&
         git submodule update &&
         git status | sed "s/$H2/XXX/" >actual &&