Subject: Re: ab/config-based-hooks-2

From: Junio C Hamano <[email-masked]>
Date: Mon, 01 Nov 2021 13:17:58 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> On Fri, Oct 29 2021, Junio C Hamano wrote:
>
>> * ab/config-based-hooks-2 (2021-10-20) 14 commits
>>  - run-command: remove old run_hook_{le,ve}() hook API
>>  - receive-pack: convert push-to-checkout hook to hook.h
>>  - read-cache: convert post-index-change to use hook.h
>>  - commit: convert {pre-commit,prepare-commit-msg} hook to hook.h
>>  - git-p4: use 'git hook' to run hooks
>>  - send-email: use 'git hook run' for 'sendemail-validate'
>>  - git hook run: add an --ignore-missing flag
>>  - merge: convert post-merge to use hook.h
>>  - hooks: convert 'post-checkout' hook to hook library
>>  - am: convert applypatch to use hook.h
>>  - rebase: convert pre-rebase to use hook.h
>>  - gc: use hook library for pre-auto-gc hook
>>  - hook: add 'run' subcommand
>>  - Merge branch 'ab/config-based-hooks-1' into ab/config-based-hooks-2
>>
>>  More "config-based hooks".
>
> Re-rolled with the simplifications you requested, and now with a smaller
> diffstat:
> https://lore.kernel.org/git/[email-masked]/

Heh, I didn't request anything.  I just gave an observation or two,
and all the rest happened in your head ;-).

I do find that the new run_hooks() that takes a single hook name
makes the resulting callers much cleaner and simpler to follow.
No callers have to call find_hook() before run_hooks() anymore,
which looks good.

The new _l() variant, not so much contributing to the clarity,
unfortunately.