]> git.ipfire.org Git - thirdparty/git.git/commit - t/t7406-submodule-update.sh
test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 24 Dec 2019 01:01:10 +0000 (17:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 22:03:55 +0000 (14:03 -0800)
commit8a1b0978abf8b3fb0ee2dc7a7d71766ed0ef4768
treeb0a1252c909f25c0b6263a541b0ec7d52df6423a
parentb9ab170752f39f4a72e3595129735c87a491dffd
test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate

Since 8cbeba0632 (tests: define GIT_TEST_PROTOCOL_VERSION,
2019-02-25), it has been possible to run tests with a newer protocol
version by setting the GIT_TEST_PROTOCOL_VERSION envvar to a version
number.  Tests that assume protocol v0 handle this by explicitly
setting

GIT_TEST_PROTOCOL_VERSION=

or similar constructs like 'test -z "$GIT_TEST_PROTOCOL_VERSION" ||
return 0' to declare that they only handle the default (v0) protocol.

The emphasis there is a bit off: it would be clearer to specify
GIT_TEST_PROTOCOL_VERSION=0 to inform the reader that these tests are
specifically testing and relying on details of protocol v0.  Do so.

This way, a reader does not need to know what the default protocol
version is, and the tests can continue to work when the default
protocol version used by Git advances past v0.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5400-send-pack.sh
t/t5500-fetch-pack.sh
t/t5512-ls-remote.sh
t/t5515-fetch-merge-logic.sh
t/t5516-fetch-push.sh
t/t5539-fetch-http-shallow.sh
t/t5541-http-push-smart.sh
t/t5551-http-fetch-smart.sh
t/t5552-skipping-fetch-negotiator.sh
t/t5700-protocol-v1.sh
t/t7406-submodule-update.sh