]> git.ipfire.org Git - thirdparty/git.git/commit
t5512: add v2 support for "ls-remote --symref" test
authorJeff King <peff@peff.net>
Fri, 14 Apr 2023 21:25:13 +0000 (17:25 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Apr 2023 22:08:12 +0000 (15:08 -0700)
commit20272ee8cf828b2a90482734731b7ed37d688160
tree25100351e0932cf08eda4a209580ad16393571e5
parent13e67aa39b26b5b391f24f9b4dfb8d5b4647b8cd
t5512: add v2 support for "ls-remote --symref" test

Commit b2f73b70b2 (t5512: compensate for v0 only sending HEAD symrefs,
2019-02-25) configured this test to always run with protocol v0, since
the output is different for v2.

But that means we are not getting any test coverage of the feature with
v2 at all. We could obviously switch to using and expecting v2, but then
that leaves v0 behind (and while we don't use it by default, it's still
important for testing interoperability with older servers). Likewise, we
could switch the expected output based on $GIT_TEST_PROTOCOL_VERSION,
but hardly anybody runs the tests for v0 these days.

Instead, let's explicitly run it for both protocol versions to make sure
they're well behaved. This matches other similar tests added later in
6a139cdd74 (ls-remote: pass heads/tags prefixes to transport,
2018-10-31), etc.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5512-ls-remote.sh