diff options
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index cae5fd012c..9099e80e9e 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -446,10 +446,13 @@ test_expect_success 'add should fail when path is used by an existing directory' ) ' -test_expect_success 'add should fail when path is relative but no url is set in the superproject' ' +test_expect_success 'use superproject as upstream when path is relative and no url is set there' ' ( cd addtest && - test_must_fail git submodule add ../repo relative + git submodule add ../repo relative && + test "$(git config -f .gitmodules submodule.relative.url)" = ../repo && + git submodule sync relative && + test "$(git config submodule.relative.url)" = "$submodurl/repo" ) ' |