connect: discover protocol version outside of get_remote_heads
In order to prepare for the addition of protocol_v2 push the protocol
version discovery outside of 'get_remote_heads()'. This will allow for
keeping the logic for processing the reference advertisement for
protocol_v1 and protocol_v0 separate from the logic for protocol_v2.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Brandon Williams7 years agocommitted byJunio C Hamano
static void set_upstreams(struct transport *transport, struct ref *refs,
int pretend)
@ -190,13 +191,26 @@ static int connect_setup(struct transport *transport, int for_push)
@@ -190,13 +191,26 @@ static int connect_setup(struct transport *transport, int for_push)
static struct ref *get_refs_via_connect(struct transport *transport, int for_push)