From d084fa2a915784d65257fbaff43f00b3ea5c8a44 Mon Sep 17 00:00:00 2001 From: Adrian Ratiu Date: Thu, 19 Feb 2026 00:23:50 +0200 Subject: hook: allow event = "" to overwrite previous values Add the ability for empty events to clear previously set multivalue variables, so the newly added "hook.*.event" behave like the other multivalued keys. Suggested-by: Patrick Steinhardt Signed-off-by: Adrian Ratiu Signed-off-by: Junio C Hamano --- Documentation/config/hook.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config/hook.adoc b/Documentation/config/hook.adoc index 0cda4745a6..64e845a260 100644 --- a/Documentation/config/hook.adoc +++ b/Documentation/config/hook.adoc @@ -12,7 +12,9 @@ hook..event:: linkgit:githooks[5] for a complete list of hook events.) On the specified event, the associated `hook..command` is executed. This is a multi-valued key. To run `hook.` on multiple - events, specify the key more than once. See linkgit:git-hook[1]. + events, specify the key more than once. An empty value resets + the list of events, clearing any previously defined events for + `hook.`. See linkgit:git-hook[1]. hook..enabled:: Whether the hook `hook.` is enabled. Defaults to `true`. -- cgit v1.3