Subject: Re: [PATCH v5 07/12] hook: add -j/--jobs option to git hook run

From: Patrick Steinhardt <[email-masked]>
Date: Fri, 27 Mar 2026 15:46:24 +0100

On Thu, Mar 26, 2026 at 12:18:14PM +0200, Adrian Ratiu wrote:
> diff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc
> index 318c637bd8..46ea52db55 100644
> --- a/Documentation/git-hook.adoc
> +++ b/Documentation/git-hook.adoc
> @@ -147,6 +148,23 @@ 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).
> ++
> +When greater than 1, it overrides the per-hook `hook.<friendly-name>.parallel`
> +setting, allowing all hooks for the event to run concurrently, even if they
> +are not individually marked as parallel.
> ++
> +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`.
> +
>  WRAPPERS
>  --------
>  

Great, this is now where we explicitly call out that "-j" overrides the
configuration.

Patrick