Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 5:55 AM brian m. carlson wrote: > > On Tue, May 14, 2019 at 07:56:49PM +0700, Duy Nguyen wrote: > > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > > wrote: > > > - close(cp.in); > > > > In the old code, we close cp.in... > > > > > +int post_rewrite_rebase_hook(co

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-15 Thread brian m. carlson
On Tue, May 14, 2019 at 07:56:49PM +0700, Duy Nguyen wrote: > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > wrote: > > - close(cp.in); > > In the old code, we close cp.in... > > > +int post_rewrite_rebase_hook(const char *name, const char *path, void > > *input) > > +{ > > + st

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-14 Thread Johannes Sixt
Am 14.05.19 um 14:56 schrieb Duy Nguyen: > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > wrote: >> diff --git a/builtin/am.c b/builtin/am.c >> index 912d9821b1..340eacbd44 100644 >> --- a/builtin/am.c >> +++ b/builtin/am.c >> @@ -441,24 +441,8 @@ static int run_applypatch_msg_hook(struct am_s

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > diff --git a/builtin/am.c b/builtin/am.c > index 912d9821b1..340eacbd44 100644 > --- a/builtin/am.c > +++ b/builtin/am.c > @@ -441,24 +441,8 @@ static int run_applypatch_msg_hook(struct am_state > *state) > */ > static int run_post_rewr

[PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-13 Thread brian m. carlson
Add support for multiple post-rewrite hooks, both for "git commit --amend" and "git rebase". Unify the hook handling between the am-based and sequencer-based code paths. Additionally add support for multiple prepare-commit-msg hooks. Note that the prepare-commit-msg hook is not passed a set of ho