X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7403-submodule-sync.sh;h=95ffe349a769a84d2eec850d376f11bdfcf2b56f;hb=02c2c60e2ab74aad202644b40338c4ff008419b3;hp=d600583cef8aa4a19d98ffa63b2cc4f76f698c9e;hpb=99ac63b092f592b7181f94b6479f3a24dbfc8fdb;p=git.git 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