Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Junio C Hamano
Jeff King writes: >> struct strs {...}; >> >> void strs_init(struct strs *); >> void strs_push(struct strs *, const char *); >> void strs_pushf(struct strs *, const char *fmt, ...); >> void strs_pushl(struct strs *, ...); >> void strs_pushv(struct strs *, const char **); >> void

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 05:10:09PM -0500, Eric Sunshine wrote: > > That would be fine with me. Though I would love it if we could find a > > shorter name for the associated functions. For example, > > argv_array_pushf() can make lines quite long, and something like > > argv_pushf() is easier to

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Eric Sunshine
On Tue, Feb 27, 2018 at 5:04 PM, Jeff King wrote: > On Tue, Feb 27, 2018 at 01:58:00PM -0800, Junio C Hamano wrote: >> So are we looking for a natural name to call an array of trings? I >> personally do not mind argv_array too much, but perhaps we can call >> it a string_array and

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:58:00PM -0800, Junio C Hamano wrote: > Jonathan Nieder writes: > > > Jonathan Tan wrote: > >> On Thu, 22 Feb 2018 13:26:58 -0500 > >> Jeff King wrote: > > > >>> I agree that it shouldn't matter much here. But if the name argv_array

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Junio C Hamano
Jonathan Nieder writes: > Jonathan Tan wrote: >> On Thu, 22 Feb 2018 13:26:58 -0500 >> Jeff King wrote: > >>> I agree that it shouldn't matter much here. But if the name argv_array >>> is standing in the way of using it, I think we should consider giving it

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-27 Thread Brandon Williams
On 02/26, Jonathan Nieder wrote: > Brandon Williams wrote: > > static char *server_capabilities; > > +static struct argv_array server_capabilities_v2 = ARGV_ARRAY_INIT; > > Can a quick doc comment describe these and how they relate? > > Is only one of them set, based on which protocol version

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-26 Thread Jonathan Nieder
Brandon Williams wrote: > Teach the client to be able to request a remote's refs using protocol > v2. This is done by having a client issue a 'ls-refs' request to a v2 > server. Yay, ls-remote support! [...] > --- a/builtin/upload-pack.c > +++ b/builtin/upload-pack.c > @@ -5,6 +5,7 @@ >

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-26 Thread Jonathan Nieder
Jonathan Tan wrote: > On Thu, 22 Feb 2018 13:26:58 -0500 > Jeff King wrote: >> I agree that it shouldn't matter much here. But if the name argv_array >> is standing in the way of using it, I think we should consider giving it >> a more general name. I picked that not to evoke

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-22 Thread Jonathan Tan
On Thu, 22 Feb 2018 13:26:58 -0500 Jeff King wrote: > On Thu, Feb 22, 2018 at 10:19:22AM -0800, Brandon Williams wrote: > > > On 02/21, Jonathan Tan wrote: > > > On Tue, 6 Feb 2018 17:12:51 -0800 > > > Brandon Williams wrote: > > > > > > > +extern struct ref

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-22 Thread Jeff King
On Thu, Feb 22, 2018 at 10:19:22AM -0800, Brandon Williams wrote: > On 02/21, Jonathan Tan wrote: > > On Tue, 6 Feb 2018 17:12:51 -0800 > > Brandon Williams wrote: > > > > > +extern struct ref **get_remote_refs(int fd_out, struct packet_reader > > > *reader, > > > +

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-22 Thread Brandon Williams
On 02/21, Jonathan Tan wrote: > On Tue, 6 Feb 2018 17:12:51 -0800 > Brandon Williams wrote: > > > +extern struct ref **get_remote_refs(int fd_out, struct packet_reader > > *reader, > > + struct ref **list, int for_push, > > +

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-21 Thread Jonathan Tan
On Tue, 6 Feb 2018 17:12:51 -0800 Brandon Williams wrote: > +extern struct ref **get_remote_refs(int fd_out, struct packet_reader *reader, > + struct ref **list, int for_push, > + const struct argv_array