Skip to content

Commit d6747ad

Browse files
peffgitster
authored andcommitted
t5512: allow any protocol version for filtered symref test
We have a test that checks that ls-remote, when asked only about HEAD, will report the HEAD symref, and not others. This was marked to always run with the v0 protocol by b2f73b7 (t5512: compensate for v0 only sending HEAD symrefs, 2019-02-25). But in v0 this test is doing nothing! For v0, upload-pack only reports the HEAD symref anyway, so we'd never have any other symref to report. For v2, it is useful; we learn about all symrefs (and the test repo has multiple), so this demonstrates that we correctly avoid showing them. We could perhaps mark this to test explicitly with v2, but since that is the default these days, it's sufficient to just run ls-remote without any protocol specification. It still passes if somebody does an explicit GIT_TEST_PROTOCOL_VERSION=0; it's just testing less. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 20272ee commit d6747ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

t/t5512-ls-remote.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,7 @@ test_expect_success 'ls-remote with filtered symref (refname)' '
271271
ref: refs/heads/main HEAD
272272
$rev HEAD
273273
EOF
274-
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
275-
# protocol v0 here.
276-
GIT_TEST_PROTOCOL_VERSION=0 git ls-remote --symref . HEAD >actual &&
274+
git ls-remote --symref . HEAD >actual &&
277275
test_cmp expect actual
278276
'
279277

0 commit comments

Comments
 (0)