Merge branch 'ld/git-p4-updates'
[gitweb.git] / t / t7400-submodule-basic.sh
index a39e69a3ebd1c39ddf8feb861f8a39c8315aa7f8..2f532529b82a847f81d4bdda17f9f07c115c2d86 100755 (executable)
@@ -126,6 +126,22 @@ test_expect_success 'submodule add' '
        test_cmp empty untracked
 '
 
+test_create_repo parent &&
+test_commit -C parent one
+
+test_expect_success 'redirected submodule add does not show progress' '
+       git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
+               2>err &&
+       ! grep % err &&
+       test_i18ngrep ! "Checking connectivity" err
+'
+
+test_expect_success 'redirected submodule add --progress does show progress' '
+       git -C addtest submodule add --progress "file://$submodurl/parent" \
+               submod-redirected-progress 2>err && \
+       grep % err
+'
+
 test_expect_success 'submodule add to .gitignored path fails' '
        (
                cd addtest-ignore &&
@@ -821,6 +837,21 @@ test_expect_success 'moving the superproject does not break submodules' '
        )
 '
 
+test_expect_success 'moving the submodule does not break the superproject' '
+       (
+               cd addtest2 &&
+               git submodule status
+       ) >actual &&
+       sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect &&
+       mv addtest2/repo addtest2/repo.bak &&
+       test_when_finished "mv addtest2/repo.bak addtest2/repo" &&
+       (
+               cd addtest2 &&
+               git submodule status
+       ) >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'submodule add --name allows to replace a submodule with another at the same path' '
        (
                cd addtest2 &&