From: Junio C Hamano Date: Tue, 19 Jun 2018 16:26:59 +0000 (-0700) Subject: Merge branch 'cf/submodule-progress-dissociate' X-Git-Tag: v2.18.0~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/bd73c3f13f34ae47b956777aa4bb785b91078ee5?ds=inline;hp=-c Merge branch 'cf/submodule-progress-dissociate' * cf/submodule-progress-dissociate: t7400: encapsulate setup code in test_expect_success --- bd73c3f13f34ae47b956777aa4bb785b91078ee5 diff --combined t/t7400-submodule-basic.sh index 2f532529b8,d501ab4b61..812db137b8 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@@ -126,8 -126,10 +126,10 @@@ test_expect_success 'submodule add' test_cmp empty untracked ' - test_create_repo parent && - test_commit -C parent one + test_expect_success 'setup parent and one repository' ' + test_create_repo parent && + test_commit -C parent one + ' test_expect_success 'redirected submodule add does not show progress' ' git -C addtest submodule add "file://$submodurl/parent" submod-redirected \ @@@ -837,21 -839,6 +839,21 @@@ test_expect_success 'moving the superpr ) ' +test_expect_success 'moving the submodule does not break the superproject' ' + ( + cd addtest2 && + git submodule status + ) >actual && + sed -e "s/^ \([^ ]* repo\) .*/-\1/" expect && + mv addtest2/repo addtest2/repo.bak && + test_when_finished "mv addtest2/repo.bak addtest2/repo" && + ( + cd addtest2 && + git submodule status + ) >actual && + test_cmp expect actual +' + test_expect_success 'submodule add --name allows to replace a submodule with another at the same path' ' ( cd addtest2 &&