From: Junio C Hamano Date: Fri, 13 May 2016 20:18:28 +0000 (-0700) Subject: Merge branch 'sb/submodule-module-list-pathspec-fix' X-Git-Tag: v2.9.0-rc0~47 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4f5067010d16937e040039d9aec4b16920f7d210?ds=inline;hp=-c Merge branch 'sb/submodule-module-list-pathspec-fix' * sb/submodule-module-list-pathspec-fix: submodule deinit test: fix broken && chain in subshell --- 4f5067010d16937e040039d9aec4b16920f7d210 diff --combined t/t7400-submodule-basic.sh index f99f674ac7,cf06b2f8c3..d48d63a6fd --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@@ -462,7 -462,7 +462,7 @@@ test_expect_success 'update --init' git config --remove-section submodule.example && test_must_fail git config submodule.example.url && - git submodule update init > update.out && + git submodule update init 2> update.out && cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir init/.git && @@@ -480,7 -480,7 +480,7 @@@ test_expect_success 'update --init fro mkdir -p sub && ( cd sub && - git submodule update ../init >update.out && + git submodule update ../init 2>update.out && cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir ../init/.git && @@@ -818,47 -818,6 +818,47 @@@ test_expect_success 'submodule add --na ) ' +test_expect_success 'recursive relative submodules stay relative' ' + test_when_finished "rm -rf super clone2 subsub sub3" && + mkdir subsub && + ( + cd subsub && + git init && + >t && + git add t && + git commit -m "initial commit" + ) && + mkdir sub3 && + ( + cd sub3 && + git init && + >t && + git add t && + git commit -m "initial commit" && + git submodule add ../subsub dirdir/subsub && + git commit -m "add submodule subsub" + ) && + mkdir super && + ( + cd super && + git init && + >t && + git add t && + git commit -m "initial commit" && + git submodule add ../sub3 && + git commit -m "add submodule sub" + ) && + git clone super clone2 && + ( + cd clone2 && + git submodule update --init --recursive && + echo "gitdir: ../.git/modules/sub3" >./sub3/.git_expect && + echo "gitdir: ../../../.git/modules/sub3/modules/dirdir/subsub" >./sub3/dirdir/subsub/.git_expect + ) && + test_cmp clone2/sub3/.git_expect clone2/sub3/.git && + test_cmp clone2/sub3/dirdir/subsub/.git_expect clone2/sub3/dirdir/subsub/.git +' + test_expect_success 'submodule add with an existing name fails unless forced' ' ( cd addtest2 && @@@ -898,7 -857,7 +898,7 @@@ test_expect_success 'submodule deinit w git init && >file && git add file && - git commit -m "repo should not be empty" + git commit -m "repo should not be empty" && git submodule deinit . ) '