]> git.ipfire.org Git - thirdparty/git.git/commit - connect.c
serve: advertise object-format capability for protocol v2
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 25 May 2020 19:59:17 +0000 (19:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2020 17:07:07 +0000 (10:07 -0700)
commit9de0dd361c9ea2ca6eca14a7dd43fe11d170a253
tree922a7a597fbb1ed8677972756cfebf098d0a228c
parentab67235bc4900d8203a1a6b6f33cf8afa845e43e
serve: advertise object-format capability for protocol v2

In order to communicate the protocol supported by the server side, add
support for advertising the object-format capability.  We check that the
client side sends us an identical algorithm if it sends us its own
object-format capability, and assume it speaks SHA-1 if not.

In the test, when we're using an algorithm other than SHA-1, we need to
specify the algorithm in use so we don't get a failure with an "unknown
format" message.  Add a test that we handle a mismatched algorithm.
Remove the test_oid_init call since it's no longer necessary.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c
serve.c
t/t5701-git-serve.sh