t5500: make hash independent
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>
brian m. carlson committed
May 25, 2020 at 19:59 UTC
f0af95f42455b03e3dd83f27f24cb6203eef99ae
1 file changed
+3
-2
t/t5500-fetch-pack.sh
+3
-2
@@ -871,9 +871,10 @@ test_expect_success 'shallow since with commit graph and already-seen commit' '
871
872
GIT_PROTOCOL=version=2 git upload-pack . <<-EOF >/dev/null
873
0012command=fetch
874
+ $(echo "object-format=$(test_oid algo)" | packetize)
875
00010013deepen-since 1
875
- 0032want $(git rev-parse other)
876
- 0032have $(git rev-parse master)
876
+ $(echo "want $(git rev-parse other)" | packetize)
877
+ $(echo "have $(git rev-parse master)" | packetize)
878
0000
879
EOF
880
)