Re: [PATCH] receive-pack: simplify run_update_post_hook()

2017-03-19 Thread Jeff King
On Sat, Mar 18, 2017 at 10:12:07AM -0700, Junio C Hamano wrote: > >> - argv_array_push(, hook); > >>for (cmd = commands; cmd; cmd = cmd->next) { > >>if (cmd->error_string || cmd->did_not_exist) > >>continue; > >> + if (!proc.args.argc) > >> +

Re: [PATCH] receive-pack: simplify run_update_post_hook()

2017-03-18 Thread Junio C Hamano
Jeff King writes: > On Fri, Mar 17, 2017 at 11:02:13PM +0100, René Scharfe wrote: > >> Instead of counting the arguments to see if there are any and then >> building the full command use a single loop and add the hook command >> just before the first argument. This reduces

Re: [PATCH] receive-pack: simplify run_update_post_hook()

2017-03-17 Thread Jonathan Nieder
René Scharfe wrote: > Instead of counting the arguments to see if there are any and then > building the full command use a single loop and add the hook command > just before the first argument. This reduces duplication and overall > code size. > > Signed-off-by: Rene Scharfe > ---

Re: [PATCH] receive-pack: simplify run_update_post_hook()

2017-03-17 Thread René Scharfe
Am 17.03.2017 um 23:23 schrieb Jeff King: On Fri, Mar 17, 2017 at 11:02:13PM +0100, René Scharfe wrote: Instead of counting the arguments to see if there are any and then building the full command use a single loop and add the hook command just before the first argument. This reduces

Re: [PATCH] receive-pack: simplify run_update_post_hook()

2017-03-17 Thread Jeff King
On Fri, Mar 17, 2017 at 11:02:13PM +0100, René Scharfe wrote: > Instead of counting the arguments to see if there are any and then > building the full command use a single loop and add the hook command > just before the first argument. This reduces duplication and overall > code size. Yeah, I