Re: ab/config-based-hooks-2
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 1, 2021, 20:17 UTC
- Message-ID
- <xmqqv91bbpft.fsf@gitster.g>
- In-Reply-To
- <211101.861r3z4qyb.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 23 quoted lines
> 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/cover-v4-00.17-00000000000-20211101T184938Z-avarab@gmail.com/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.