@matheusbsbs / matheus-bagliano / commits / 3716d50dd5
Fork 0

remote-testgit: adapt for object-format

When using an algorithm other than SHA-1, we need the remote helper to advertise support for the object-format extension and provide information back to us so that we can properly parse refs and return data. Ensure that the test remote helper understands these extensions. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Jun 19, 2020 at 17:56 UTC 3716d50dd5c8ee7e5ccaa89fcbfff2cd1b82ad1d
1 file changed +6
t/t5801/git-remote-testgit
+6
@@ -52,9 +52,11 @@ do
52 test -n "$GIT_REMOTE_TESTGIT_SIGNED_TAGS" && echo "signed-tags"
53 test -n "$GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE" && echo "no-private-update"
54 echo 'option'
55 + echo 'object-format'
56 echo
57 ;;
58 list)
59 + echo ":object-format $(git rev-parse --show-object-format=storage)"
60 git for-each-ref --format='? %(refname)' 'refs/heads/' 'refs/tags/'
61 head=$(git symbolic-ref HEAD)
62 echo "@$head HEAD"
@@ -139,6 +141,10 @@ do
141 test $val = "true" && force="true" || force=
142 echo "ok"
143 ;;
144 + object-format)
145 + test $val = "true" && object_format="true" || object_format=
146 + echo "ok"
147 + ;;
148 *)
149 echo "unsupported"
150 ;;