Subject: Re: [PATCH 2/6] commit: fix patch hunk editing with "commit -p -m"

From: Junio C Hamano <[email-masked]>
Date: Thu, 06 Mar 2014 13:47:54 -0800

Junio C Hamano <[email-masked]> writes:

> Name it run_hook_le() (name modelled after execle()), and call it in
> your change where you add new calls to this function, and add a thin
> wrapper run_hook() that preserves the traditional "We can pass only
> the index-file" for new callers we do not even know about on the
> topics in flight.
>
> Later we can eradicate callers of run_hook() that treats the index-file
> specially, which was a grave mistake in a public API.

I am also OK if the patch _removed_ run_hook() and renamed the one
with the current semantics to run_hook_with_custom_index() or
something.

It would allow us to catch any in-flight topic we do not know about
that adds a call to run_hook() expecting that it would take a custom
index file.  We will see a link failure, and then we can evil-merge
to update such a callsite to call run_hook_with_custom_index().

An updated run_hook() with different function signature (which is
in this patch) will also let us notice, but the evil-merge to fix
the resulting mess will have to be larger than necessary, which is
not what we want.

Thanks.