]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7400-submodule-basic.sh
git submodule add: make the <path> parameter optional
[thirdparty/git.git] / t / t7400-submodule-basic.sh
index 0f2ccc6cf0123951d9bdbb880931868f29de5b4e..a0cc99ab9f5b262851a1075193f5529b5582fd0a 100755 (executable)
@@ -306,4 +306,20 @@ test_expect_success 'submodule <invalid-path> warns' '
 
 '
 
+test_expect_success 'add submodules without specifying an explicit path' '
+       mkdir repo &&
+       cd repo &&
+       git init &&
+       echo r >r &&
+       git add r &&
+       git commit -m "repo commit 1" &&
+       cd .. &&
+       git clone --bare repo/ bare.git &&
+       cd addtest &&
+       git submodule add "$submodurl/repo" &&
+       git config -f .gitmodules submodule.repo.path repo &&
+       git submodule add "$submodurl/bare.git" &&
+       git config -f .gitmodules submodule.bare.path bare
+'
+
 test_done