From: Junio C Hamano Date: Mon, 27 Mar 2017 17:59:21 +0000 (-0700) Subject: Merge branch 'sb/submodule-update-initial-runs-custom-script' X-Git-Tag: v2.13.0-rc0~70 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/980ee776383cacdf77dd79667daa2efcb0b5882d?ds=inline;hp=-c Merge branch 'sb/submodule-update-initial-runs-custom-script' A test fix. * sb/submodule-update-initial-runs-custom-script: t7406: correct test case for submodule-update initial population --- 980ee776383cacdf77dd79667daa2efcb0b5882d diff --combined t/t7406-submodule-update.sh index 347857fa7c,a70fe96ad6..4ac386d98b --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@@ -140,23 -140,6 +140,23 @@@ test_expect_success 'submodule update - test_i18ncmp expect2 actual2 ' +cat <expect2 +Submodule 'foo/sub' ($pwd/withsubs/../rebasing) registered for path 'sub' +EOF + +test_expect_success 'submodule update --init from and of subdirectory' ' + git init withsubs && + (cd withsubs && + mkdir foo && + git submodule add "$(pwd)/../rebasing" foo/sub && + (cd foo && + git submodule deinit -f sub && + git submodule update --init sub 2>../../actual2 + ) + ) && + test_i18ncmp expect2 actual2 +' + apos="'"; test_expect_success 'submodule update does not fetch already present commits' ' (cd submodule && @@@ -442,11 -425,11 +442,11 @@@ test_expect_success 'submodule update ' test_expect_success 'submodule update - command run for initial population of submodule' ' - cat <<-\ EOF >expect + cat >expect <<-EOF && Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\'' - EOF && + EOF rm -rf super/submodule && - test_must_fail git -C super submodule update >../actual && + test_must_fail git -C super submodule update 2>actual && test_cmp expect actual && git -C super submodule update --checkout '