summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-08-16 11:41:26 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-16 11:41:26 -0700
commit4a5a8008fde47a4c999657515b396d53153bec3d (patch)
tree6624368842e18a02e89e32f55bccfaeff7ffb55f /t
parentMerge branch 'jc/zlib-wrap' into maint (diff)
parentsubmodule add: always initialize .git/config entry (diff)
downloadtgif-4a5a8008fde47a4c999657515b396d53153bec3d.tar.xz
Merge branch 'jc/submodule-sync-no-auto-vivify' into maint
* jc/submodule-sync-no-auto-vivify: submodule add: always initialize .git/config entry submodule sync: do not auto-vivify uninteresting submodule
Diffstat (limited to 't')
-rwxr-xr-xt/t7403-submodule-sync.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh
index d600583cef..95ffe349a7 100755
--- a/t/t7403-submodule-sync.sh
+++ b/t/t7403-submodule-sync.sh
@@ -25,7 +25,8 @@ test_expect_success setup '
git clone super super-clone &&
(cd super-clone && git submodule update --init) &&
git clone super empty-clone &&
- (cd empty-clone && git submodule init)
+ (cd empty-clone && git submodule init) &&
+ git clone super top-only-clone
'
test_expect_success 'change submodule' '
@@ -66,7 +67,7 @@ test_expect_success '"git submodule sync" should update submodule URLs' '
)
'
-test_expect_success '"git submodule sync" should update submodule URLs if not yet cloned' '
+test_expect_success '"git submodule sync" should update known submodule URLs' '
(cd empty-clone &&
git pull &&
git submodule sync &&
@@ -74,4 +75,14 @@ test_expect_success '"git submodule sync" should update submodule URLs if not ye
)
'
+test_expect_success '"git submodule sync" should not vivify uninteresting submodule' '
+ (cd top-only-clone &&
+ git pull &&
+ git submodule sync &&
+ test -z "$(git config submodule.submodule.url)" &&
+ git submodule sync submodule &&
+ test -z "$(git config submodule.submodule.url)"
+ )
+'
+
test_done