mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
t5512: compensate for v0 only sending HEAD symrefs
Protocol v2 supports sending non-HEAD symrefs, but this is not true of protocol v0. Some tests expect protocol v0 behavior, so fix them to use protocol v0. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
15ff91aa83
commit
b2f73b70b2
|
@ -223,7 +223,9 @@ test_expect_success 'ls-remote --symref' '
|
|||
$(git rev-parse refs/tags/mark1.10) refs/tags/mark1.10
|
||||
$(git rev-parse refs/tags/mark1.2) refs/tags/mark1.2
|
||||
EOF
|
||||
git ls-remote --symref >actual &&
|
||||
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
|
||||
# protocol v0 here.
|
||||
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
@ -232,7 +234,9 @@ test_expect_success 'ls-remote with filtered symref (refname)' '
|
|||
ref: refs/heads/master HEAD
|
||||
1bd44cb9d13204b0fe1958db0082f5028a16eb3a HEAD
|
||||
EOF
|
||||
git ls-remote --symref . HEAD >actual &&
|
||||
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
|
||||
# protocol v0 here.
|
||||
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . HEAD >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
@ -243,7 +247,9 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' '
|
|||
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo
|
||||
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
|
||||
EOF
|
||||
git ls-remote --symref --heads . >actual &&
|
||||
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
|
||||
# protocol v0 here.
|
||||
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
@ -252,9 +258,11 @@ test_expect_success 'ls-remote --symref omits filtered-out matches' '
|
|||
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo
|
||||
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
|
||||
EOF
|
||||
git ls-remote --symref --heads . >actual &&
|
||||
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
|
||||
# protocol v0 here.
|
||||
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual &&
|
||||
test_cmp expect actual &&
|
||||
git ls-remote --symref . "refs/heads/*" >actual &&
|
||||
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . "refs/heads/*" >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
|
Loading…
Reference in a new issue