]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5500: make hash independent
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 25 May 2020 19:59:18 +0000 (19:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2020 17:07:07 +0000 (10:07 -0700)
This test has hard-coded pkt-lines with object IDs.  The pkt-line
lengths necessarily differ between hash algorithms, so generate these
lines with the packetize helper so they're always the right size.  In
addition, we will require an object-format capability for SHA-256, so
pass that capability on to the upload-pack process.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5500-fetch-pack.sh

index 52dd1a688cd052a098586b6e1a89b2f621fdd99c..8fee99ecfb2fc9f2b64a1956272211985a3d1241 100755 (executable)
@@ -871,9 +871,10 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '
 
        GIT_PROTOCOL=version=2 git upload-pack . <<-EOF >/dev/null
        0012command=fetch
+       $(echo "object-format=$(test_oid algo)" | packetize)
        00010013deepen-since 1
-       0032want $(git rev-parse other)
-       0032have $(git rev-parse master)
+       $(echo "want $(git rev-parse other)" | packetize)
+       $(echo "have $(git rev-parse master)" | packetize)
        0000
        EOF
        )