Subject: Re: [PATCH v2 0/8] Specify hooks via configs

From: Adrian Ratiu <[email-masked]>
Date: Fri, 20 Feb 2026 14:51:51 +0200

On Thu, 19 Feb 2026, Junio C Hamano <[email-masked]> wrote:
> Adrian Ratiu <[email-masked]> writes:
>
>> v2 addresses all feedback received in v1.
>>
>> This series adds a new feature: the ability to specify commands to run
>> for hook events via config entries (including shell commands).
>>
>> So instead of dropping a shell script or a custom program in .git/hooks
>> you can now tell git via config files to run a program or shell script
>> (can be specified directly in the config) when you run hook "foo".
>>
>> This also means you can setup global hooks to run in multiple repos via
>> global configs and there's an option to disable them if necessary.
>>
>> For simplicity, because this series is becoming rather big, hooks are
>> still executed sequentially (.jobs == 1). Parallel execution is added
>> in another patch series.
>>
>> This is based on the latest v8 hooks-conversion series [1] which has
>> not yet landed in next or master.
>
> Thanks for a reroll.  I was a bit concerned to allow configuration
> files to speicify hooks as it would reduce discoverability (i.e.,
> today, we can "ls .git/hooks/" to see everything that potentially
> will be triggered, but now we need to be aware of what your sysadmin
> dropped in /etc/gitconfig to get the whole picture.  "git hook list"
> would solve that issue nicely.
>
> By the way, the discussion thread for the base topic hasn't seen
> any activity in the latest round after it updated for the comments
> received in the previous round.  It appears that it is ready to move
> forward?  Let's mark it for 'next' in that case.

Yes, thank you, landing that series will make testing this one easier.

I'm also working on v2 of the parallel series, will send it very soon.

Both will benefit from landing the base preparatory "hook conversion"
series.