From: Thomas Rast Date: Tue, 04 Jun 2013 09:03:33 GMT Subject: Re: [PATCH v2 5/8] sequencer: run post-rewrite hook Message-ID: <877giaxn6i.fsf@linux-k42r.v.cablecom.net> In-Reply-To: <7vhahfdnu6.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Felipe Contreras writes: > >> +static void run_rewrite_hook(void) >> +{ >> + struct strbuf buf = STRBUF_INIT; >> + struct child_process proc; >> + const char *argv[3]; >> + int code, i; >> + >> + argv[0] = find_hook("post-rewrite"); >> + if (!argv[0]) >> + return; >> + >> + argv[1] = "rebase"; >> + argv[2] = NULL; > > When the end-user action is "git cherry-pick A..B", shouldn't > the rewrite hook be called with "cherry-pick" not "rebase" as its > first argument? The whole function was copied from builtin/commit.c except for that string. So it should be refactored anyway, with the "cherry-pick" being an argument. -- Thomas Rast trast@{inf,student}.ethz.ch