From: Junio C Hamano Date: Tue, 28 Mar 2017 20:52:29 +0000 (-0700) Subject: Merge branch 'sb/submodule-update-initial-runs-custom-script' into maint X-Git-Tag: v2.12.3~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/04b4f7d579056cedaae2de0a019e5993b4d9c2d0?ds=inline;hp=-c Merge branch 'sb/submodule-update-initial-runs-custom-script' into maint A test fix. * sb/submodule-update-initial-runs-custom-script: t7406: correct test case for submodule-update initial population --- 04b4f7d579056cedaae2de0a019e5993b4d9c2d0 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 '