]> git.ipfire.org Git - thirdparty/git.git/commit
hook: allow disabling config hooks
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Wed, 18 Feb 2026 22:23:49 +0000 (00:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Feb 2026 21:23:41 +0000 (13:23 -0800)
commit1ecce722cdb9c42dd4c69e45e02cb850cd558ef2
tree8bedc56c8f312ef0f22e9c900da0a86e60c0ae03
parent03b4043b9182bd3d36541371fa39f04d6d038286
hook: allow disabling config hooks

Hooks specified via configs are always enabled, however users
might want to disable them without removing from the config,
like locally disabling a global hook.

Add a hook.<name>.enabled config which defaults to true and
can be optionally set for each configured hook.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/hook.adoc
hook.c
t/t1800-hook.sh