Skip to content

Commit 4ddd3f5

Browse files
bk2204gitster
authored andcommitted
t5704: send object-format capability with SHA-256
When we speak protocol v2 in this test, we must pass the object-format header if the algorithm is not SHA-1. Otherwise, git upload-pack fails because the hash algorithm doesn't match and not because we've failed to speak the protocol correctly. Pass the header so that our assertions test what we're really interested in. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f7c6a3b commit 4ddd3f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/t5704-protocol-violations.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ making sure that we do not segfault or otherwise behave badly.'
99
test_expect_success 'extra delim packet in v2 ls-refs args' '
1010
{
1111
packetize command=ls-refs &&
12+
packetize "object-format=$(test_oid algo)" &&
1213
printf 0001 &&
1314
# protocol expects 0000 flush here
1415
printf 0001
@@ -21,6 +22,7 @@ test_expect_success 'extra delim packet in v2 ls-refs args' '
2122
test_expect_success 'extra delim packet in v2 fetch args' '
2223
{
2324
packetize command=fetch &&
25+
packetize "object-format=$(test_oid algo)" &&
2426
printf 0001 &&
2527
# protocol expects 0000 flush here
2628
printf 0001

0 commit comments

Comments
 (0)