aboutsummaryrefslogtreecommitdiff
path: root/t/t7403-submodule-sync.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-19 09:45:37 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-19 09:45:37 -0700
commit0591c0a5be7d58dfe2c69c8a81b2cebbb0337320 (patch)
tree78bdfd99a808beaedbdb9bb055e2e693b0dfaa68 /t/t7403-submodule-sync.sh
parent765c7e4f3100484ea277f043048631ea93b3127a (diff)
parent2cd9de3e18183422cd7ec3cd81cebc656068ea42 (diff)
downloadgit-0591c0a5be7d58dfe2c69c8a81b2cebbb0337320.tar.gz
git-0591c0a5be7d58dfe2c69c8a81b2cebbb0337320.tar.xz
Merge branch 'jc/submodule-sync-no-auto-vivify'
* jc/submodule-sync-no-auto-vivify: submodule add: always initialize .git/config entry submodule sync: do not auto-vivify uninteresting submodule Conflicts: git-submodule.sh
Diffstat (limited to 't/t7403-submodule-sync.sh')
-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 d600583ce..95ffe349a 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