From: Adrian Ratiu Date: Fri, 10 Apr 2026 09:05:55 GMT Subject: [PATCH v7 00/13] Run hooks in parallel Message-ID: <20260410090608.75283-1-adrian.ratiu@collabora.com> In-Reply-To: <20260204173328.1601807-1-adrian.ratiu@collabora.com> Hello everyone, This series enables running hook commands in parallel and is based on the latest master branch. It requires commit 2226ffaacd (run_processes_parallel(): fix order of sigpipe handling, 2026-04-08) from master. v7 is a minor refresh which includes a new parallel test contributed by Jeff King to test the bugfix above which landed recently on master. Branch is pushed to GitHub: https://github.com/10ne1/git/tree/dev/aratiu/parallel-hooks-v7 Successful CI run: https://github.com/10ne1/git/actions/runs/24234022244 Changes in v7: * Apply Jeff's patch as the 13'th commit in this series, slightly rewording it and moving the test at Jeff's suggestion (Adrian) Range-diff v6 -> v7: 1: b79b6d4d92 = 1: c361429e4d repository: fix repo_init() memleak due to missing _clear() 2: 04d70c5fe6 = 2: 96d11e8a82 config: add a repo_config_get_uint() helper 3: 9d52e73211 = 3: d7972c7557 hook: parse the hook.jobs config 4: fa52e229e6 = 4: 6fb33026da hook: allow parallel hook execution 5: 255e87fe42 = 5: d5d56c2753 hook: allow pre-push parallel execution 6: eb60a9effe = 6: 48584cf296 hook: mark non-parallelizable hooks 7: 44eaa1b5eb = 7: 2606af97ad hook: add -j/--jobs option to git hook run 8: dcd7f91d96 = 8: 950f4dca9f hook: add per-event jobs config 9: 7b1513b648 = 9: 4a9e0ec914 hook: warn when hook..jobs is set 10: 1a808c35c3 = 10: aa1583ba65 hook: move is_known_hook() to hook.c for wider use 11: a5d37a0ea1 = 11: 3f70f2c2bf hook: add hook..enabled switch 12: 136cd50cea = 12: 56e66c409d hook: allow hook.jobs=-1 to use all available CPU cores -: ---------- > 13: 044996431a t1800: test SIGPIPE with parallel hooks Adrian Ratiu (9): repository: fix repo_init() memleak due to missing _clear() config: add a repo_config_get_uint() helper hook: parse the hook.jobs config hook: allow pre-push parallel execution hook: add per-event jobs config hook: warn when hook..jobs is set hook: move is_known_hook() to hook.c for wider use hook: add hook..enabled switch hook: allow hook.jobs=-1 to use all available CPU cores Emily Shaffer (3): hook: allow parallel hook execution hook: mark non-parallelizable hooks hook: add -j/--jobs option to git hook run Jeff King (1): t1800: test SIGPIPE with parallel hooks Documentation/config/hook.adoc | 76 +++++ Documentation/git-hook.adoc | 23 +- Makefile | 2 +- builtin/am.c | 8 +- builtin/checkout.c | 19 +- builtin/clone.c | 6 +- builtin/hook.c | 46 ++- builtin/receive-pack.c | 3 +- builtin/worktree.c | 2 +- commit.c | 2 +- config.c | 28 ++ config.h | 13 + hook.c | 286 +++++++++++++++- hook.h | 38 ++- meson.build | 24 +- parse.c | 9 + parse.h | 1 + repository.c | 3 + repository.h | 10 + t/t1800-hook.sh | 584 ++++++++++++++++++++++++++++++++- transport.c | 6 +- 21 files changed, 1119 insertions(+), 70 deletions(-) -- 2.52.0