diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:08 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:09 -0700 |
| commit | 0cd4fb9f46eb0ebd0d243a886ce9a52210e0723e (patch) | |
| tree | 8069cdba6fa414dc0cb1e11c5c7de7446ef6071f /Documentation/config | |
| parent | 4e5821732e684f21a35288d8e67f453ca2595083 (diff) | |
| parent | 5c58dbc887a1f3530cb29c995f63675beebb22e9 (diff) | |
| download | git-0cd4fb9f46eb0ebd0d243a886ce9a52210e0723e.tar.xz | |
Merge branch 'ar/config-hook-cleanups'
Code clean-up around the recent "hooks defined in config" topic.
* ar/config-hook-cleanups:
hook: reject unknown hook names in git-hook(1)
hook: show disabled hooks in "git hook list"
hook: show config scope in git hook list
hook: introduce hook_config_cache_entry for per-hook data
t1800: add test to verify hook execution ordering
hook: make consistent use of friendly-name in docs
hook: replace hook_list_clear() -> string_list_clear_func()
hook: detect & emit two more bugs
hook: rename cb_data_free/alloc -> hook_data_free/alloc
hook: fix minor style issues
builtin/receive-pack: properly init receive_hook strbuf
hook: move unsorted_string_list_remove() to string-list.[ch]
Diffstat (limited to 'Documentation/config')
| -rw-r--r-- | Documentation/config/hook.adoc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Documentation/config/hook.adoc b/Documentation/config/hook.adoc index 64e845a260..9e78f26439 100644 --- a/Documentation/config/hook.adoc +++ b/Documentation/config/hook.adoc @@ -1,23 +1,23 @@ -hook.<name>.command:: - The command to execute for `hook.<name>`. `<name>` is a unique - "friendly" name that identifies this hook. (The hook events that - trigger the command are configured with `hook.<name>.event`.) The - value can be an executable path or a shell oneliner. If more than - one value is specified for the same `<name>`, only the last value - parsed is used. See linkgit:git-hook[1]. +hook.<friendly-name>.command:: + The command to execute for `hook.<friendly-name>`. `<friendly-name>` + is a unique name that identifies this hook. The hook events that + trigger the command are configured with `hook.<friendly-name>.event`. + The value can be an executable path or a shell oneliner. If more than + one value is specified for the same `<friendly-name>`, only the last + value parsed is used. See linkgit:git-hook[1]. -hook.<name>.event:: - The hook events that trigger `hook.<name>`. The value is the name - of a hook event, like "pre-commit" or "update". (See +hook.<friendly-name>.event:: + The hook events that trigger `hook.<friendly-name>`. The value is the + name of a hook event, like "pre-commit" or "update". (See linkgit:githooks[5] for a complete list of hook events.) On the - specified event, the associated `hook.<name>.command` is executed. - This is a multi-valued key. To run `hook.<name>` on multiple + specified event, the associated `hook.<friendly-name>.command` is executed. + This is a multi-valued key. To run `hook.<friendly-name>` on multiple events, specify the key more than once. An empty value resets the list of events, clearing any previously defined events for - `hook.<name>`. See linkgit:git-hook[1]. + `hook.<friendly-name>`. See linkgit:git-hook[1]. -hook.<name>.enabled:: - Whether the hook `hook.<name>` is enabled. Defaults to `true`. +hook.<friendly-name>.enabled:: + Whether the hook `hook.<friendly-name>` is enabled. Defaults to `true`. Set to `false` to disable the hook without removing its configuration. This is particularly useful when a hook is defined in a system or global config file and needs to be disabled for a |
