Subject: Re: [RTC/PATCH] Add 'update-branch' hook

From: Junio C Hamano <[email-masked]>
Date: Mon, 21 Apr 2014 16:00:34 -0700

Felipe Contreras <[email-masked]> writes:

> ... there are _already_ hooks without pre/post.

Like commit-msg?  Yes, it would have been nicer if it were named
verify-commit-message or something.

Old mistakes are harder to change because of inertia.  It is not a
good excuse to knowingly make a new mistake to add new exceptions
that the users need to check documentations for, is it?

> And it's not confusing,

A simple fact that Ilya asked the question tells us otherwise ;-)

I personally do not see an immediate need for post-update-branch,
but if the new hook is about intervening an operation, it would be a
good idea to name the hook with "pre-" like other "before doing
something, validate the operation and forbid" hooks.  Otherwise it
would be impossible to later add "post-update-branch" for whatever
reason without inviting "why does pre-update-branch hook is misnamed
as just update-branch, when other validation and post-action pair
are named pre-something and post-something?".