summaryrefslogtreecommitdiff
path: root/t/t7406-submodule-update.sh
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2019-02-25 21:54:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 01:02:42 (GMT)
commitab0c5f5096be62c2c964549673bc8965b2ddfb0e (patch)
tree28ed21d44c5ca0b40db1b6f14b052cb84499d5d7 /t/t7406-submodule-update.sh
parent3a5728dccaaab0741059cce12f9a58ec674f7c4e (diff)
downloadgit-ab0c5f5096be62c2c964549673bc8965b2ddfb0e.zip
git-ab0c5f5096be62c2c964549673bc8965b2ddfb0e.tar.gz
git-ab0c5f5096be62c2c964549673bc8965b2ddfb0e.tar.bz2
tests: always test fetch of unreachable with v0
Some tests check that fetching an unreachable object fails, but protocol v2 allows such fetches. Unset GIT_TEST_PROTOCOL_VERSION so that these tests are always run using protocol v0. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7406-submodule-update.sh')
-rwxr-xr-xt/t7406-submodule-update.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index e87164a..c973278 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -943,7 +943,10 @@ test_expect_success 'submodule update clone shallow submodule outside of depth'
cd super3 &&
sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
mv -f .gitmodules.tmp .gitmodules &&
- test_must_fail git submodule update --init --depth=1 2>actual &&
+ # Some protocol versions (e.g. 2) support fetching
+ # unadvertised objects, so restrict this test to v0.
+ 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 &&
git submodule update --init --depth=1 >actual &&