Re: [PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-27 Thread Brandon Williams
On 02/27, Stefan Beller wrote: > > + > > + /* Add initial haves */ > > + ret = add_haves(_buf, in_vain); > > I like the shortness and conciseness of this send_fetch_request > function as it makes clear what is happening over the wire, however > I wonder if we can improve on that,

Re: [PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-27 Thread Stefan Beller
On Tue, Feb 6, 2018 at 5:12 PM, Brandon Williams wrote: > When communicating with a v2 server, perform a fetch by requesting the > 'fetch' command. > > Signed-off-by: Brandon Williams > --- > builtin/fetch-pack.c | 2 +- > fetch-pack.c | 252

Re: [PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-26 Thread Brandon Williams
On 02/23, Jonathan Tan wrote: > On Tue, 6 Feb 2018 17:12:58 -0800 > Brandon Williams wrote: > > > + while ((oid = get_rev())) { > > + packet_buf_write(req_buf, "have %s\n", oid_to_hex(oid)); > > + if (++haves_added >= INITIAL_FLUSH) > > +

Re: [PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-23 Thread Jonathan Tan
On Tue, 6 Feb 2018 17:12:58 -0800 Brandon Williams wrote: > + while ((oid = get_rev())) { > + packet_buf_write(req_buf, "have %s\n", oid_to_hex(oid)); > + if (++haves_added >= INITIAL_FLUSH) > + break; > + }; Unnecessary

[PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-06 Thread Brandon Williams
When communicating with a v2 server, perform a fetch by requesting the 'fetch' command. Signed-off-by: Brandon Williams --- builtin/fetch-pack.c | 2 +- fetch-pack.c | 252 - fetch-pack.h | 4 +-