Since v4: - Reordered the commits. Hookdir support is added sooner and conversion of existing hooks is moved to another branch (part II) for hopefully more granular reviewing. If folks hate this, let me know and I'll reintegrate the two topics. - Removed the --porcelain option on 'git hook list'. General consensus is that this should use a format string instead, and I didn't want to write that new feature while I had been promising v5 "any day now". - Added functionality for 'skip' to remove hooks from the execution list. - General nits from folks. Coming soon: - 'git hook list --format' - More conversions (in the other topic) - As required by new conversions, stdin support for hooks Coming much later: - 'git hook add'/'git hook edit'. The config isn't too ugly to manually edit, for now, so I'd like to get the hooks themselves all figured out before adding these convenience tools. I do still think they're a good idea, as they'll increase the discoverability of the feature for new users. More detailed notes in each commit. Thanks all for your patience and reviews. - Emily Emily Shaffer (8): doc: propose hooks managed by the config hook: scaffolding for git-hook subcommand hook: add list command hook: include hookdir hook in list hook: implement hookcmd.<name>.skip parse-options: parse into strvec hook: add 'run' subcommand hook: replace find_hook() with hook_exists() .gitignore | 1 + Documentation/Makefile | 1 + Documentation/config/hook.txt | 14 + Documentation/git-hook.txt | 81 ++++ Documentation/technical/api-parse-options.txt | 5 + .../technical/config-based-hooks.txt | 367 ++++++++++++++++++ Makefile | 2 + builtin.h | 1 + builtin/hook.c | 163 ++++++++ git.c | 1 + hook.c | 282 ++++++++++++++ hook.h | 58 +++ parse-options-cb.c | 16 + parse-options.h | 4 + t/t1360-config-based-hooks.sh | 232 +++++++++++ 15 files changed, 1228 insertions(+) create mode 100644 Documentation/config/hook.txt create mode 100644 Documentation/git-hook.txt create mode 100644 Documentation/technical/config-based-hooks.txt create mode 100644 builtin/hook.c create mode 100644 hook.c create mode 100644 hook.h create mode 100755 t/t1360-config-based-hooks.sh -- 2.28.0.rc0.142.g3c755180ce-goog