Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-20 Thread Jeff King
On Tue, Jul 19, 2016 at 09:05:14AM -0700, Stefan Beller wrote: > > I know that writing the function myself and then critiquing is the very > > definition of a strawman. :) But it's the best I could think of. Maybe > > you had something more clever in mind? > > Actually no, I had not. I was

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-19 Thread Stefan Beller
On Tue, Jul 19, 2016 at 3:07 AM, Jeff King wrote: > On Mon, Jul 18, 2016 at 10:28:25PM -0700, Stefan Beller wrote: > >> On Sat, Jul 16, 2016 at 12:56 AM, Jeff King wrote: >> >> > + if (use_keepalive == KEEPALIVE_AFTER_NUL && >> >> > !keepalive_active)

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-19 Thread Jeff King
On Mon, Jul 18, 2016 at 10:28:25PM -0700, Stefan Beller wrote: > On Sat, Jul 16, 2016 at 12:56 AM, Jeff King wrote: > >> > + if (use_keepalive == KEEPALIVE_AFTER_NUL && > >> > !keepalive_active) { > >> > + const char *p = memchr(data, '\0',

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-18 Thread Stefan Beller
On Sat, Jul 16, 2016 at 12:56 AM, Jeff King wrote: >> > + if (use_keepalive == KEEPALIVE_AFTER_NUL && >> > !keepalive_active) { >> > + const char *p = memchr(data, '\0', sz); >> > + if (p) { >> > +

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-16 Thread Jeff King
On Fri, Jul 15, 2016 at 10:24:16AM -0700, Stefan Beller wrote: > > @@ -319,10 +331,60 @@ static void rp_error(const char *err, ...) > > static int copy_to_sideband(int in, int out, void *arg) > > { > > char data[128]; > > While looking at this code, do you think it is feasible to

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-15 Thread Junio C Hamano
Jeff King writes: > diff --git a/builtin/index-pack.c b/builtin/index-pack.c > index 1cba120..54f2cfb 100644 > --- a/builtin/index-pack.c > +++ b/builtin/index-pack.c > @@ -1626,6 +1626,7 @@ int cmd_index_pack(int argc, const char **argv, const > char *prefix) > struct

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-15 Thread Stefan Beller
On Fri, Jul 15, 2016 at 3:43 AM, Jeff King wrote: > > Signed-off-by: Jeff King Read-entirely-by Stefan ;) Thanks! > @@ -319,10 +331,60 @@ static void rp_error(const char *err, ...) > static int copy_to_sideband(int in, int out, void *arg) > { > char

[PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-15 Thread Jeff King
After a client has sent us the complete pack, we may spend some time processing the data and running hooks. If the client asked us to be quiet, receive-pack won't send any progress data during the index-pack or connectivity-check steps. And hooks may or may not produce their own progress output.