usability: don't ask questions if no reply is required
[gitweb.git] / t / t7406-submodule-update.sh
index 725bbed1f866265e8030ab6e4007c04f9493b6b5..4ac386d98b8ebdfb4808b9a8119900ee23b5dfa9 100755 (executable)
@@ -441,6 +441,16 @@ test_expect_success 'submodule update - command in .git/config catches failure -
        test_i18ncmp actual expect
 '
 
+test_expect_success 'submodule update - command run for initial population of submodule' '
+       cat >expect <<-EOF &&
+       Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
+       EOF
+       rm -rf super/submodule &&
+       test_must_fail git -C super submodule update 2>actual &&
+       test_cmp expect actual &&
+       git -C super submodule update --checkout
+'
+
 cat << EOF >expect
 Execution of 'false $submodulesha1' failed in submodule path '../super/submodule'
 Failed to recurse into submodule path '../super'
@@ -493,6 +503,7 @@ test_expect_success 'submodule init picks up merge' '
 '
 
 test_expect_success 'submodule update --merge  - ignores --merge  for new submodules' '
+       test_config -C super submodule.submodule.update checkout &&
        (cd super &&
         rm -rf submodule &&
         git submodule update submodule &&
@@ -505,6 +516,7 @@ test_expect_success 'submodule update --merge  - ignores --merge  for new submod
 '
 
 test_expect_success 'submodule update --rebase - ignores --rebase for new submodules' '
+       test_config -C super submodule.submodule.update checkout &&
        (cd super &&
         rm -rf submodule &&
         git submodule update submodule &&