connect: add function to parse multiple v1 capability values
commit2c6a403d96cd5d31f1638679502f06e2b953647f
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 25 May 2020 19:58:52 +0000 (25 19:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2020 17:07:06 +0000 (27 10:07 -0700)
tree5d22723ca1de5cd7b06b79b26860115211dbac77
parentbf30dbf82611e3bb7e2bbac1d38bb38ad10c8636
connect: add function to parse multiple v1 capability values

In a capability response, we can have multiple symref entries.  In the
future, we will also allow for multiple hash algorithms to be specified.
To avoid duplication, expand the parse_feature_value function to take an
optional offset where the parsing should begin next time.  Add a wrapper
function that allows us to query the next server feature value, and use
it in the existing symref parsing code.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c