t5562: use $ZERO_OID
authorbrian m. carlson <redacted>
Sat, 21 Dec 2019 19:49:34 +0000 (19:49 +0000)
committerJunio C Hamano <redacted>
Wed, 15 Jan 2020 22:06:19 +0000 (14:06 -0800)
This test uses $_z40 to express an all-zeros object ID, which doesn't
work for SHA-256.  Use $ZERO_OID instead, which is the right size for
all hash values.

Signed-off-by: brian m. carlson <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t5562-http-backend-content-length.sh

index f0f425b2cf5746fb3f7205909cbc93eb25a84874..4a110b307ee53e623bff98a68307c4947139c39f 100755 (executable)
@@ -59,7 +59,7 @@ test_expect_success 'setup' '
        printf done | packetize >>fetch_body &&
        test_copy_bytes 10 <fetch_body >fetch_body.trunc &&
        hash_next=$(git commit-tree -p HEAD -m next HEAD^{tree}) &&
-       printf "%s %s refs/heads/newbranch\\0report-status\\n" "$_z40" "$hash_next" | packetize >push_body &&
+       printf "%s %s refs/heads/newbranch\\0report-status\\n" "$ZERO_OID" "$hash_next" | packetize >push_body &&
        printf 0000 >>push_body &&
        echo "$hash_next" | git pack-objects --stdout >>push_body &&
        test_copy_bytes 10 <push_body >push_body.trunc &&
git clone https://git.99rst.org/PROJECT