Skip to content

Commit 9dc78c2

Browse files
bk2204gitster
authored andcommitted
t5562: pass object-format in synthesized test data
Ensure that we pass the object-format capability in the synthesized test data so that this test works with algorithms other than SHA-1. In addition, add an additional test using the old data for when we're using SHA-1 so that we can be sure that we preserve backwards compatibility with servers not offering the object-format capability. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b65dc2c commit 9dc78c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t5562-http-backend-content-length.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ssize_b100dots() {
4646
}
4747

4848
test_expect_success 'setup' '
49+
test_oid_init &&
4950
HTTP_CONTENT_ENCODING="identity" &&
5051
export HTTP_CONTENT_ENCODING &&
5152
git config http.receivepack true &&
@@ -62,8 +63,8 @@ test_expect_success 'setup' '
6263
test_copy_bytes 10 <fetch_body >fetch_body.trunc &&
6364
hash_next=$(git commit-tree -p HEAD -m next HEAD^{tree}) &&
6465
{
65-
printf "%s %s refs/heads/newbranch\\0report-status\\n" \
66-
"$ZERO_OID" "$hash_next" | packetize &&
66+
printf "%s %s refs/heads/newbranch\\0report-status object-format=%s\\n" \
67+
"$ZERO_OID" "$hash_next" "$(test_oid algo)" | packetize &&
6768
printf 0000 &&
6869
echo "$hash_next" | git pack-objects --stdout
6970
} >push_body &&

0 commit comments

Comments
 (0)