summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-07-22 14:24:35 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-07-22 14:24:35 -0700
commitc56dce3b811400e73e7b68464cf229aa0edb9d8f (patch)
treeda27f15acf73ca6f932c32d2e71a40e73c853e30 /t
parentMerge branch 'maint' (diff)
parentsubmodule add: clean up duplicated code (diff)
downloadtgif-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 b2b26b72d0..5afe6ccd78 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 &&
(