aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-22 14:24:35 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-22 14:24:35 -0700
commitc56dce3b811400e73e7b68464cf229aa0edb9d8f (patch)
treeda27f15acf73ca6f932c32d2e71a40e73c853e30 /t
parented16d0dbf11128e1f92b39a373a83442fa6d5051 (diff)
parentf22a17e8da25a043950a13f11035930922bb86e7 (diff)
downloadgit-c56dce3b811400e73e7b68464cf229aa0edb9d8f.tar.gz
git-c56dce3b811400e73e7b68464cf229aa0edb9d8f.tar.xz
Merge branch 'jl/submodule-add-relurl-wo-upstream'
* jl/submodule-add-relurl-wo-upstream: submodule add: clean up duplicated code submodule add: allow relative repository path even when no url is set submodule add: test failure when url is not configured in superproject Conflicts: git-submodule.sh
Diffstat (limited to 't')
-rwxr-xr-xt/t7400-submodule-basic.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index b2b26b72d..5afe6ccd7 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -446,6 +446,16 @@ test_expect_success 'add should fail when path is used by an existing directory'
)
'
+test_expect_success 'use superproject as upstream when path is relative and no url is set there' '
+ (
+ cd addtest &&
+ 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"
+ )
+'
+
test_expect_success 'set up for relative path tests' '
mkdir reltest &&
(