path: root/t/
diff options
authorJonathan Tan <>2019-02-25 21:54:08 (GMT)
committerJunio C Hamano <>2019-03-07 01:02:42 (GMT)
commitab0c5f5096be62c2c964549673bc8965b2ddfb0e (patch)
tree28ed21d44c5ca0b40db1b6f14b052cb84499d5d7 /t/
parent3a5728dccaaab0741059cce12f9a58ec674f7c4e (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 4 insertions, 1 deletions
diff --git a/t/ b/t/
index e87164a..c973278 100755
--- a/t/
+++ b/t/
@@ -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 &&