Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-28 Thread brian m. carlson
On 2019-05-15 at 22:27:56, brian m. carlson wrote: > On Tue, May 14, 2019 at 07:46:17PM +0700, Duy Nguyen wrote: > > 'struct string_list;' should be enough (and a bit lighter) although I > > don't suppose it really matters. > > I can make that change. One thing I noticed when making this change i

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-17 Thread Johannes Schindelin
Hi Hannes, On Thu, 16 May 2019, Johannes Sixt wrote: > Am 16.05.19 um 00:44 schrieb brian m. carlson: > > On Tue, May 14, 2019 at 05:12:39PM +0200, Johannes Schindelin wrote: > >> On Tue, 14 May 2019, brian m. carlson wrote: > >>> +/* > >>> + * Return 1 if a hook exists at path (which may be modi

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-16 Thread Johannes Sixt
Am 16.05.19 um 00:44 schrieb brian m. carlson: > On Tue, May 14, 2019 at 05:12:39PM +0200, Johannes Schindelin wrote: >> On Tue, 14 May 2019, brian m. carlson wrote: >>> +/* >>> + * Return 1 if a hook exists at path (which may be modified) using >>> access(2) >>> + * with check (which should be F_

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-15 Thread brian m. carlson
On Tue, May 14, 2019 at 05:12:39PM +0200, Johannes Schindelin wrote: > Hi brian, > > On Tue, 14 May 2019, brian m. carlson wrote: > > > diff --git a/builtin/commit.c b/builtin/commit.c > > index 833ecb316a..29bf80e0d1 100644 > > --- a/builtin/commit.c > > +++ b/builtin/commit.c > > @@ -943,7 +943

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-15 Thread brian m. carlson
On Tue, May 14, 2019 at 07:46:17PM +0700, Duy Nguyen wrote: > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > wrote: > > - argv_array_push(&hook.args, p); > > - while ((p = va_arg(args, const char *))) > > - argv_array_push(&hook.args, p); > > - hook.env = env; >

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-14 Thread Johannes Schindelin
Hi brian, On Tue, 14 May 2019, brian m. carlson wrote: > diff --git a/builtin/commit.c b/builtin/commit.c > index 833ecb316a..29bf80e0d1 100644 > --- a/builtin/commit.c > +++ b/builtin/commit.c > @@ -943,7 +943,7 @@ static int prepare_to_commit(const char *index_file, > const char *prefix, >

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > -int run_hook_ve(const char *const *env, const char *name, va_list args) > +int find_hooks(const char *name, struct string_list *list) > { > - struct child_process hook = CHILD_PROCESS_INIT; > - const char *p; > + struct

[PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-13 Thread brian m. carlson
A variety of types of software take advantage of Git's hooks. However, if a user would like to integrate multiple pieces of software which use a particular hook, they currently must manage those hooks themselves, which can be burdensome. Sometimes various pieces of software try to overwrite each ot