From 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 May 2020 00:06:52 +0100 Subject: revert(3p/git): Revert merge of git upstream at v2.26.2 This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3. --- third_party/git/t/t7406-submodule-update.sh | 33 ++++++++--------------------- 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'third_party/git/t/t7406-submodule-update.sh') diff --git a/third_party/git/t/t7406-submodule-update.sh b/third_party/git/t/t7406-submodule-update.sh index 4fb447a143e6..c973278300a5 100755 --- a/third_party/git/t/t7406-submodule-update.sh +++ b/third_party/git/t/t7406-submodule-update.sh @@ -158,6 +158,7 @@ test_expect_success 'submodule update --init from and of subdirectory' ' test_i18ncmp expect2 actual2 ' +apos="'"; test_expect_success 'submodule update does not fetch already present commits' ' (cd submodule && echo line3 >> file && @@ -167,7 +168,7 @@ test_expect_success 'submodule update does not fetch already present commits' ' ) && (cd super/submodule && head=$(git rev-parse --verify HEAD) && - echo "Submodule path ${SQ}submodule$SQ: checked out $SQ$head$SQ" > ../../expected && + echo "Submodule path ${apos}submodule$apos: checked out $apos$head$apos" > ../../expected && git reset --hard HEAD~1 ) && (cd super && @@ -406,26 +407,12 @@ test_expect_success 'submodule update - command in .git/config' ' ) ' -test_expect_success 'submodule update - command in .gitmodules is rejected' ' +test_expect_success 'submodule update - command in .gitmodules is ignored' ' test_when_finished "git -C super reset --hard HEAD^" && git -C super config -f .gitmodules submodule.submodule.update "!false" && git -C super commit -a -m "add command to .gitmodules file" && git -C super/submodule reset --hard $submodulesha1^ && - test_must_fail git -C super submodule update submodule -' - -test_expect_success 'fsck detects command in .gitmodules' ' - git init command-in-gitmodules && - ( - cd command-in-gitmodules && - git submodule add ../submodule submodule && - test_commit adding-submodule && - - git config -f .gitmodules submodule.submodule.update "!false" && - git add .gitmodules && - test_commit configuring-update && - test_must_fail git fsck - ) + git -C super submodule update submodule ' cat << EOF >expect @@ -494,9 +481,6 @@ test_expect_success 'recursive submodule update - command in .git/config catches ' test_expect_success 'submodule init does not copy command into .git/config' ' - test_when_finished "git -C super update-index --force-remove submodule1" && - test_when_finished git config -f super/.gitmodules \ - --remove-section submodule.submodule1 && (cd super && git ls-files -s submodule >out && H=$(cut -d" " -f2 out) && @@ -505,9 +489,10 @@ test_expect_success 'submodule init does not copy command into .git/config' ' git config -f .gitmodules submodule.submodule1.path submodule1 && git config -f .gitmodules submodule.submodule1.url ../submodule && git config -f .gitmodules submodule.submodule1.update !false && - test_must_fail git submodule init submodule1 && - test_expect_code 1 git config submodule.submodule1.update >actual && - test_must_be_empty actual + git submodule init submodule1 && + echo "none" >expect && + git config submodule.submodule1.update >actual && + test_cmp expect actual ) ' @@ -960,7 +945,7 @@ test_expect_success 'submodule update clone shallow submodule outside of depth' mv -f .gitmodules.tmp .gitmodules && # Some protocol versions (e.g. 2) support fetching # unadvertised objects, so restrict this test to v0. - test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \ + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ git submodule update --init --depth=1 2>actual && test_i18ngrep "Direct fetching of that commit failed." actual && git -C ../submodule config uploadpack.allowReachableSHA1InWant true && -- cgit 1.4.1