Subject: Re: [PATCH v3 5/6] hook: include hooks from the config

From: Junio C Hamano <[email-masked]>
Date: Thu, 19 Aug 2021 16:48:31 -0700

Emily Shaffer <[email-masked]> writes:

> On Thu, Aug 19, 2021 at 03:39:06PM -0700, Junio C Hamano wrote:
>> 
>> My original question was primarily because I thought the
>> second-level <name> corresponded to <event>.  If that were the case,
>> it can trivially be made simpler without making it typo-prone, i.e.
>> 
>>     [hook "pre-commit"]
>> 	command = check-whitespace && spellcheck-log-message
>> 
>>     [hook "another-hookable-event"]
>> 	command = check-whitespace && spellcheck-log-message
>> 
>> since the name of the event would be much shorter than the command
>> line.  But since we are not grouping per hookable event (to apply
>> the "last one wins" rule to determine which single command is the
>> one that gets to run).
>> 
>
> To be clear, the config schema did work the way you describe until this
> revision. Ævar suggested the change and it seemed like a good idea to me
> (and the rest of the Google folks) so I changed between v2 and v3 of the
> restart.

To be clear, you do not want to take the above as my suggestion to
go back to the previous one, since that is not what I meant.  As
long as you and others are happy with what you folks ended up with,
i.e. the current one that uses <name> that is a short-hand for
<command>, that is what matters.

Thanks.