submodule loading: separate code path for .gitmodules and config overlay
[gitweb.git] / t / t7400-submodule-basic.sh
index c2706fe4723778b68b9673fd85267ea475f791f2..dcac364c5fa2a8ff7fe264a21fb9682ec934a874 100755 (executable)
@@ -38,6 +38,14 @@ test_expect_success 'submodule update aborts on missing .gitmodules file' '
        test_i18ngrep "Submodule path .sub. not initialized" actual
 '
 
+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" &&
+       git config -f .gitmodules submodule.s.path sub &&
+       test_must_fail git submodule init
+'
+
 test_expect_success 'configuration parsing' '
        test_when_finished "rm -f .gitmodules" &&
        cat >.gitmodules <<-\EOF &&
@@ -273,7 +281,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '
        test_cmp empty untracked
 '
 
-test_expect_success 'submodule add with \\ in path' '
+test_expect_success !CYGWIN 'submodule add with \\ in path' '
        test_when_finished "rm -rf parent sub\\with\\backslash" &&
 
        # Initialize a repo with a backslash in its name