Re: [PATCH v2 5/8] sequencer: run post-rewrite hook
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Jun 4, 2013, 09:03 UTC
- Message-ID
- <877giaxn6i.fsf@linux-k42r.v.cablecom.net>
- In-Reply-To
- <7vhahfdnu6.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 19 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> 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