This test shows that git submodule add produces the wrong submodule URL when the origin URL of the superproject is of the form: foo/bar. The problem is fixed by a subsequent patch. Signed-off-by: Jon Seymour <jon.seymour@xxxxxxxxx> --- t/t7400-submodule-basic.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index b838f43..71f30d8 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -533,6 +533,23 @@ test_expect_sucess 'test that submodule add creates the correct url when super o test "$(git config submodule.sub.url)" = ../../relative/subrepo ) ' +test_expect_failure 'test that submodule add creates the correct url when super origin url is relative/repo' ' + mkdir reladd && + ( + cd reladd && + git init && + git remote add origin relative/repo + mkdir sub && + ( + cd sub && + git init && + test_commit foo + ) && + git submodule add ../subrepo ./sub && + test "$(git config submodule.sub.url)" = ../relative/subrepo + ) +' + test_expect_success 'moving the superproject does not break submodules' ' ( cd addtest && -- 1.7.10.2.594.g5c52315 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html