@matheusbsbs / matheus-bagliano / commits / 9dc78c20dc
Fork 0

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>

brian m. carlson committed May 25, 2020 at 19:59 UTC 9dc78c20dc2aa5ed073a95dc35880d940658a5be
1 file changed +3 -2
t/t5562-http-backend-content-length.sh
+3 -2
@@ -46,6 +46,7 @@ ssize_b100dots() {
46 }
47
48 test_expect_success 'setup' '
49 + test_oid_init &&
50 HTTP_CONTENT_ENCODING="identity" &&
51 export HTTP_CONTENT_ENCODING &&
52 git config http.receivepack true &&
@@ -62,8 +63,8 @@ test_expect_success 'setup' '
63 test_copy_bytes 10 <fetch_body >fetch_body.trunc &&
64 hash_next=$(git commit-tree -p HEAD -m next HEAD^{tree}) &&
65 {
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 &&
68 printf 0000 &&
69 echo "$hash_next" | git pack-objects --stdout
70 } >push_body &&