Thread (1 message) 1 message, 1 author, 2021-11-01

Re: ab/config-based-hooks-2

From: Junio C Hamano <hidden>
Date: 2021-11-01 20:18:09

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Fri, Oct 29 2021, Junio C Hamano wrote:
quoted
* 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/ (local)
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help