aboutsummaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2009-09-22 17:10:12 +0200
committerJunio C Hamano <gitster@pobox.com>2009-09-22 12:24:49 -0700
commit1414e5788b85787a712a30977b388200f1bc04da (patch)
tree883d7027fceed475781430ff2d57957d648ab136 /t/t7400-submodule-basic.sh
parenta16753dc2e6f885fd30e570610c3e8cf355ecf04 (diff)
downloadgit-1414e5788b85787a712a30977b388200f1bc04da.tar.gz
git-1414e5788b85787a712a30977b388200f1bc04da.tar.xz
git submodule add: make the <path> parameter optional
When <path> is not given, use the "humanish" part of the source repository instead. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 0f2ccc6cf..a0cc99ab9 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -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