Re: [PATCH v4] connect: in ref advertisement, shallows are last

2017-09-23 Thread Junio C Hamano
Jonathan Tan writes: > Currently, get_remote_heads() parses the ref advertisement in one loop, > allowing refs and shallow lines to intersperse, despite this not being > allowed by the specification. Refactor get_remote_heads() to use two > loops instead, enforcing that refs come first, and then

Re: [PATCH v4] connect: in ref advertisement, shallows are last

2017-09-22 Thread Jonathan Tan
On Fri, 22 Sep 2017 14:01:04 -0700 Brandon Williams wrote: > > +static void process_capabilities(int len) > > +{ > > + int nul_location = strlen(packet_buffer); > > It may make more sense to not rely on accessing a global buffer here > directly and instead pass in the buff you're working on, m

Re: [PATCH v4] connect: in ref advertisement, shallows are last

2017-09-22 Thread Brandon Williams
On 09/22, Jonathan Tan wrote: > Currently, get_remote_heads() parses the ref advertisement in one loop, > allowing refs and shallow lines to intersperse, despite this not being > allowed by the specification. Refactor get_remote_heads() to use two > loops instead, enforcing that refs come first, an

[PATCH v4] connect: in ref advertisement, shallows are last

2017-09-22 Thread Jonathan Tan
Currently, get_remote_heads() parses the ref advertisement in one loop, allowing refs and shallow lines to intersperse, despite this not being allowed by the specification. Refactor get_remote_heads() to use two loops instead, enforcing that refs come first, and then shallows. This also makes it e