summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-16 18:41:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-16 18:41:26 (GMT)
commit4a5a8008fde47a4c999657515b396d53153bec3d (patch)
tree6624368842e18a02e89e32f55bccfaeff7ffb55f /t
parenta35d78c0f483a65ea96c4f0c9a825bf28a386273 (diff)
parent2cd9de3e18183422cd7ec3cd81cebc656068ea42 (diff)
downloadgit-4a5a8008fde47a4c999657515b396d53153bec3d.zip
git-4a5a8008fde47a4c999657515b396d53153bec3d.tar.gz
git-4a5a8008fde47a4c999657515b396d53153bec3d.tar.bz2
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 d600583..95ffe34 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