Re: [WIP 08/15] connect: discover protocol version outside of get_remote_heads

2017-12-08 Thread Brandon Williams
On 12/07, Junio C Hamano wrote: > Brandon Williams writes: > > > While we could wrap the preamble into a function it sort of defeats the > > purpose since you want to be able to call different functions based on > > the protocol version you're speaking. That way you can have

Re: [WIP 08/15] connect: discover protocol version outside of get_remote_heads

2017-12-07 Thread Junio C Hamano
Brandon Williams writes: > While we could wrap the preamble into a function it sort of defeats the > purpose since you want to be able to call different functions based on > the protocol version you're speaking. That way you can have hard > separations between the code paths

Re: [WIP 08/15] connect: discover protocol version outside of get_remote_heads

2017-12-07 Thread Brandon Williams
On 12/07, Junio C Hamano wrote: > Brandon Williams writes: > > > @@ -193,7 +195,17 @@ int cmd_fetch_pack(int argc, const char **argv, const > > char *prefix) > > if (!conn) > > return args.diag_url ? 0 : 1; > > } > > -

Re: [WIP 08/15] connect: discover protocol version outside of get_remote_heads

2017-12-07 Thread Junio C Hamano
Brandon Williams writes: > @@ -193,7 +195,17 @@ int cmd_fetch_pack(int argc, const char **argv, const > char *prefix) > if (!conn) > return args.diag_url ? 0 : 1; > } > - get_remote_heads(fd[0], NULL, 0, , 0, NULL, ); > + > +

[WIP 08/15] connect: discover protocol version outside of get_remote_heads

2017-12-04 Thread Brandon Williams
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: