Re: [PATCH v4 6/9] hook: add -j/--jobs option to git hook run
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 24, 2026, 09:07 UTC
- Message-ID
- <acJUaVquXMhYn8CD@pks.im>
- In-Reply-To
- <20260320135311.331463-7-adrian.ratiu@collabora.com>
On Fri, Mar 20, 2026 at 03:53:08PM +0200, Adrian Ratiu wrote:
Show 19 quoted lines
> diff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc > index e7d399ae57..b4c95a31a8 100644 > --- a/Documentation/git-hook.adoc > +++ b/Documentation/git-hook.adoc > @@ -140,6 +141,18 @@ OPTIONS > mirroring the output style of `git config --show-scope`. Traditional > hooks from the hookdir are unaffected. > > +-j:: > +--jobs:: > + Only valid for `run`. > ++ > +Specify how many hooks to run simultaneously. If this flag is not specified, > +the value of the `hook.jobs` config is used, see linkgit:git-config[1]. If > +neither is specified, defaults to 1 (serial execution). Some hooks always run > +sequentially regardless of this flag or the `hook.jobs` config, because git > +knows they cannot safely run in parallel: `applypatch-msg`, `pre-commit`, > +`prepare-commit-msg`, `commit-msg`, `post-commit`, `post-checkout`, and > +`push-to-checkout`.
I guess this is the place where we need to point out that this will also override the `hook.<friendly-name>.parallel` setting.
Patrick