mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
3a5728dcca
commit
ab0c5f5096
@@ -636,7 +636,9 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a
|
||||
test_commit -C server 6 &&
|
||||
|
||||
git init client &&
|
||||
test_must_fail git -C client fetch-pack ../server \
|
||||
# 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 -C client fetch-pack ../server \
|
||||
$(git -C server rev-parse refs/heads/master^) 2>err &&
|
||||
test_i18ngrep "Server does not allow request for unadvertised object" err
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user