convert: release strbuf on error return in filter_buffer_or_fd()
[gitweb.git] / t / t7400-submodule-basic.sh
index d0357f1d8abadab286bd476a57039054e1ae940f..6f8337ffb563cf13f194186b101bbaebf0beeb35 100755 (executable)
@@ -38,14 +38,12 @@ test_expect_success 'submodule update aborts on missing .gitmodules file' '
        test_i18ngrep "Submodule path .sub. not initialized" actual
 '
 
-test_expect_success 'configuration parsing' '
+test_expect_success 'submodule update aborts on missing gitmodules url' '
+       test_when_finished "git update-index --remove sub" &&
+       git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
        test_when_finished "rm -f .gitmodules" &&
-       cat >.gitmodules <<-\EOF &&
-       [submodule "s"]
-               path
-               ignore
-       EOF
-       test_must_fail git status
+       git config -f .gitmodules submodule.s.path sub &&
+       test_must_fail git submodule init
 '
 
 test_expect_success 'setup - repository in init subdirectory' '
@@ -1281,4 +1279,10 @@ test_expect_success 'init properly sets the config' '
        test_must_fail git -C multisuper_clone config --get submodule.sub1.active
 '
 
+test_expect_success 'recursive clone respects -q' '
+       test_when_finished "rm -rf multisuper_clone" &&
+       git clone -q --recurse-submodules multisuper multisuper_clone >actual &&
+       test_must_be_empty actual
+'
+
 test_done