summaryrefslogtreecommitdiff
path: root/t/t5562-http-backend-content-length.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-05-25 19:59:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-27 17:07:06 (GMT)
commit9dc78c20dc2aa5ed073a95dc35880d940658a5be (patch)
treee50d1e7aa0e58e8ed66b31857d7905c4e4f9a561 /t/t5562-http-backend-content-length.sh
parentb65dc2cebd6ac7d869895297ed5061af15428544 (diff)
downloadgit-9dc78c20dc2aa5ed073a95dc35880d940658a5be.zip
git-9dc78c20dc2aa5ed073a95dc35880d940658a5be.tar.gz
git-9dc78c20dc2aa5ed073a95dc35880d940658a5be.tar.bz2
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>
Diffstat (limited to 't/t5562-http-backend-content-length.sh')
-rwxr-xr-xt/t5562-http-backend-content-length.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh
index 3f4ac71..c6ec625 100755
--- a/t/t5562-http-backend-content-length.sh
+++ b/t/t5562-http-backend-content-length.sh
@@ -46,6 +46,7 @@ ssize_b100dots() {
}
test_expect_success 'setup' '
+ test_oid_init &&
HTTP_CONTENT_ENCODING="identity" &&
export HTTP_CONTENT_ENCODING &&
git config http.receivepack true &&
@@ -62,8 +63,8 @@ test_expect_success 'setup' '
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" \
- "$ZERO_OID" "$hash_next" | packetize &&
+ printf "%s %s refs/heads/newbranch\\0report-status object-format=%s\\n" \
+ "$ZERO_OID" "$hash_next" "$(test_oid algo)" | packetize &&
printf 0000 &&
echo "$hash_next" | git pack-objects --stdout
} >push_body &&