@@ -22,3 +22,52 @@ hook.<name>.enabled::
2222 configuration. This is particularly useful when a hook is defined
2323 in a system or global config file and needs to be disabled for a
2424 specific repository. See linkgit:git-hook[1].
25+
26+ hook.<name >.parallel::
27+ Whether the hook `hook.<name>` may run in parallel with other hooks
28+ for the same event. Defaults to `false` . Set to `true` only when the
29+ hook script is safe to run concurrently with other hooks for the same
30+ event. If any hook for an event does not have this set to `true` ,
31+ all hooks for that event run sequentially regardless of `hook.jobs` .
32+ Only configured (named) hooks need to declare this. Traditional hooks
33+ found in the hooks directory do not need to, and run in parallel when
34+ the effective job count is greater than 1. See linkgit:git-hook[1].
35+
36+ hook.<event >.jobs::
37+ Specifies how many hooks can be run simultaneously for the `<event>`
38+ hook event (e.g. `hook.post-receive.jobs = 4` ). Overrides `hook.jobs`
39+ for this specific event. The same parallelism restrictions apply: this
40+ setting has no effect unless all configured hooks for the event have
41+ `hook.<friendly-name>.parallel` set to `true` . Must be a positive int,
42+ zero is rejected with a warning. See linkgit:git-hook[1].
43+ +
44+ Note on naming: although this key resembles `hook.<friendly-name>.*`
45+ (a per-hook setting), `<event>` must be the event name, not a hook
46+ friendly name. The key component is stored literally and looked up by
47+ event name at runtime with no translation between the two namespaces.
48+ A key like `hook.my-hook.jobs` is stored under `"my-hook"` but the
49+ lookup at runtime uses the event name (e.g. `"post-receive"` ), so
50+ `hook.my-hook.jobs` is silently ignored even when `my-hook` is
51+ registered for that event. Use `hook.post-receive.jobs` or any other
52+ valid event name when setting `hook.<event>.jobs` .
53+
54+ hook.jobs::
55+ Specifies how many hooks can be run simultaneously during parallelized
56+ hook execution. If unspecified, defaults to 1 (serial execution).
57+ Can be overridden on a per-event basis with `hook.<event>.jobs` .
58+ Some hooks always run sequentially regardless of this setting because
59+ git knows they cannot safely be parallelized: `applypatch-msg` ,
60+ `pre-commit` , `prepare-commit-msg` , `commit-msg` , `post-commit` ,
61+ `post-checkout` , and `push-to-checkout` .
62+ +
63+ This setting has no effect unless all configured hooks for the event have
64+ `hook.<name>.parallel` set to `true` .
65+ +
66+ This has no effect for hooks requiring separate output streams (like `pre-push` )
67+ unless `extensions.hookStdoutToStderr` is enabled.
68+
69+ hook.forceStdoutToStderr::
70+ A boolean that enables the `extensions.hookStdoutToStderr` behavior
71+ (merging stdout to stderr for all hooks) globally. This effectively
72+ forces all hooks to behave as if the extension was enabled, allowing
73+ parallel execution for hooks like `pre-push` .
0 commit comments