Git fork

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>

authored by

brian m. carlson and committed by
Junio C Hamano
3716d50d 6161ce7b

+6
+6
t/t5801/git-remote-testgit
··· 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 56 ;; 57 list) 58 git for-each-ref --format='? %(refname)' 'refs/heads/' 'refs/tags/' 59 head=$(git symbolic-ref HEAD) 60 echo "@$head HEAD" ··· 137 case $opt in 138 force) 139 test $val = "true" && force="true" || force= 140 echo "ok" 141 ;; 142 *)
··· 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 case $opt in 140 force) 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 *)