From: Adrian Ratiu Date: Wed, 04 Feb 2026 16:51:22 GMT Subject: [PATCH 0/4] Specify hooks via configs Message-ID: <20260204165126.1548805-1-adrian.ratiu@collabora.com> Hello everyone, This series adds a new feature: the ability to specify commands to run for hook events via config entries (including shell commands). The config schema is identical to the one developed by Emily and AEvar a few years ago [1] though the implementation is significantly different because it's based on the new / cleaned-up hook.[ch] APIs. [2]. For simplicity, hooks are still executed sequentially (.jobs == 1) in this series, just like before. Parallel execution will be enabled in a separate series based on this one. The hook execution order is this: 1. Hooks read from the config. If multiple hook commands are specified for a single event, they are executed in config discovery order. 2. The default hooks from the hookdir. The above order can be changed if necessary. Again, this is based on the latest v8 hooks-conversion series [2] which has not yet landed in next or master. Branch pused to GitHub: [3] Succesful CI run: [4] Many thanks to all who contributed to this effort up to now, including Emily, AEvar, Junio, Patrick, Peff, Kristoffer, Chris and many others. Thank you, Adrian 1: https://lore.kernel.org/git/20210715232603.3415111-1-emilyshaffer@google.com/ 2: https://lore.kernel.org/git/20250925125352.1728840-1-adrian.ratiu@collabora.com/T/#m41f793907f46fd04f44ff1b06c53d20af38e6cb2 3: https://github.com/10ne1/git/tree/refs/heads/dev/aratiu/config-hooks-v1 4: https://github.com/10ne1/git/actions/runs/21676691521 Emily Shaffer (4): hook: run a list of hooks hook: introduce "git hook list" hook: include hooks from the config hook: allow out-of-repo 'git hook' invocations Documentation/config/hook.adoc | 17 +++ Documentation/git-hook.adoc | 131 ++++++++++++++++++++++- builtin/hook.c | 53 ++++++++++ builtin/receive-pack.c | 23 +++- git.c | 2 +- hook.c | 188 ++++++++++++++++++++++++++++----- hook.h | 55 +++++++++- refs.c | 23 +++- t/t1800-hook.sh | 158 +++++++++++++++++++++++++-- transport.c | 23 +++- 10 files changed, 633 insertions(+), 40 deletions(-) create mode 100644 Documentation/config/hook.adoc -- 2.52.0.732.gb351b5166d.dirty