{"thread":{"id":"65669","subject":"[PATCH 0/4] doc: hook: small improvements","startedAt":"2026-05-21T16:26:58Z","lastAt":"2026-05-25T11:09:28Z","messageCount":10,"participants":["kristofferhaugsbakk@fastmail.com","Kristoffer Haugsbakk","Jean-Noël AVILA","Junio C Hamano","Adrian Ratiu"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"543835","messageId":"CV_doc_hook.6f0@msgid.xyz","threadId":"65669","inReplyTo":null,"subject":"[PATCH 0/4] doc: hook: small improvements","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-21T16:25:54Z","receivedAt":"2026-05-21T16:26:58Z","isPatch":true,"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nTopic name: kh/doc-hook\n\nTopic summary: Small improvements to git-hook(1) and the associated config.\n\n[1/4] doc: hook: remove stray backtick\n[2/4] doc: hook: consistently capitalize Git\n[3/4] doc: config: include existing git-hook(1) section\n[4/4] doc: hook: don’t self-link via config include\n\n Documentation/config.adoc      |  2 ++\n Documentation/config/hook.adoc | 19 +++++++++++++------\n Documentation/git-hook.adoc    | 11 ++++++-----\n 3 files changed, 21 insertions(+), 11 deletions(-)\n\n\nbase-commit: aec3f587505a472db67e9462d0702e7d463a449d\n-- \n2.54.0.13.g9c7419e39f8\n\n"},{"id":"543836","messageId":"doc_hook_stray_backtick.6f1@msgid.xyz","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"[PATCH 1/4] doc: hook: remove stray backtick","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-21T16:25:55Z","receivedAt":"2026-05-21T16:27:17Z","isPatch":true,"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-hook.adoc | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc\nindex 46ea52db55f..96c5c9c3c23 100644\n--- a/Documentation/git-hook.adoc\n+++ b/Documentation/git-hook.adoc\n@@ -41,7 +41,7 @@ spell-checker for your commit messages, you would write a configuration like so:\n \n With this config, when you run 'git commit', first `~/bin/linter --cpp20` will\n have a chance to check your files to be committed (during the `pre-commit` hook\n-event`), and then `~/bin/spellchecker` will have a chance to check your commit\n+event), and then `~/bin/spellchecker` will have a chance to check your commit\n message (during the `commit-msg` hook event).\n \n Commands are run in the order Git encounters their associated\n-- \n2.54.0.13.g9c7419e39f8\n\n"},{"id":"543837","messageId":"doc_hook_capitalize_Git.6f2@msgid.xyz","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"[PATCH 2/4] doc: hook: consistently capitalize Git","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-21T16:25:56Z","receivedAt":"2026-05-21T16:27:36Z","isPatch":true,"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-hook.adoc | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc\nindex 96c5c9c3c23..750df58e58e 100644\n--- a/Documentation/git-hook.adoc\n+++ b/Documentation/git-hook.adoc\n@@ -3,7 +3,7 @@ git-hook(1)\n \n NAME\n ----\n-git-hook - Run git hooks\n+git-hook - Run Git hooks\n \n SYNOPSIS\n --------\n@@ -15,8 +15,8 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-A command interface for running git hooks (see linkgit:githooks[5]),\n-for use by other scripted git commands.\n+A command interface for running Git hooks (see linkgit:githooks[5]),\n+for use by other scripted Git commands.\n \n This command parses the default configuration files for sets of configs like\n so:\n@@ -161,7 +161,7 @@ setting, allowing all hooks for the event to run concurrently, even if they\n are not individually marked as parallel.\n +\n Some hooks always run sequentially regardless of this flag or the\n-`hook.jobs` config, because git knows they cannot safely run in parallel:\n+`hook.jobs` config, because Git knows they cannot safely run in parallel:\n `applypatch-msg`, `pre-commit`, `prepare-commit-msg`, `commit-msg`,\n `post-commit`, `post-checkout`, and `push-to-checkout`.\n \n-- \n2.54.0.13.g9c7419e39f8\n\n"},{"id":"543838","messageId":"doc_config_include_hook.6f3@msgid.xyz","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"[PATCH 3/4] doc: config: include existing git-hook(1) section","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-21T16:25:57Z","receivedAt":"2026-05-21T16:27:55Z","isPatch":true,"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nIt is already included in git-hook(1) but missing from git-config(1).\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/config.adoc | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/config.adoc b/Documentation/config.adoc\nindex dcea3c0c15e..a80e7db46d9 100644\n--- a/Documentation/config.adoc\n+++ b/Documentation/config.adoc\n@@ -451,6 +451,8 @@ include::config/guitool.adoc[]\n \n include::config/help.adoc[]\n \n+include::config/hook.adoc[]\n+\n include::config/http.adoc[]\n \n include::config/i18n.adoc[]\n-- \n2.54.0.13.g9c7419e39f8\n\n"},{"id":"543839","messageId":"doc_hook_no_self-link.6f4@msgid.xyz","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"[PATCH 4/4] doc: hook: don’t self-link via config include","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-21T16:25:58Z","receivedAt":"2026-05-21T16:28:13Z","isPatch":true,"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nDo not link to git-hook(1) from the config options when we already are\nin that doc.\n\nThis implementation is similar to the updates to git-init(1) and\ngit-commit(1), implemented in [1] and [2], respectively.\n\n† 1: e7b3a768 (doc: git-init: rework config item init.templateDir,\n     2024-03-10)\n† 2: 819fdd6e (doc: convert git commit config to new format, 2025-01-15)\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/config/hook.adoc | 19 +++++++++++++------\n Documentation/git-hook.adoc    |  1 +\n 2 files changed, 14 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/config/hook.adoc b/Documentation/config/hook.adoc\nindex a9dc0063c12..083dc60a132 100644\n--- a/Documentation/config/hook.adoc\n+++ b/Documentation/config/hook.adoc\n@@ -1,10 +1,17 @@\n+ifdef::git-hook[]\n+:see-git-hook:\n+endif::git-hook[]\n+ifndef::git-hook[]\n+:see-git-hook: See linkgit:git-hook[1].\n+endif::git-hook[]\n+\n hook.<friendly-name>.command::\n \tThe command to execute for `hook.<friendly-name>`. `<friendly-name>`\n \tis a unique name that identifies this hook. The hook events that\n \ttrigger the command are configured with `hook.<friendly-name>.event`.\n \tThe value can be an executable path or a shell oneliner. If more than\n \tone value is specified for the same `<friendly-name>`, only the last\n-\tvalue parsed is used. See linkgit:git-hook[1].\n+\tvalue parsed is used. {see-git-hook}\n \n hook.<friendly-name>.event::\n \tThe hook events that trigger `hook.<friendly-name>`. The value is the\n@@ -14,7 +21,7 @@ hook.<friendly-name>.event::\n \tThis is a multi-valued key. To run `hook.<friendly-name>` on multiple\n \tevents, specify the key more than once. An empty value resets\n \tthe list of events, clearing any previously defined events for\n-\t`hook.<friendly-name>`. See linkgit:git-hook[1].\n+\t`hook.<friendly-name>`. {see-git-hook}\n +\n The `<friendly-name>` must not be the same as a known hook event name\n (e.g. do not use `hook.pre-commit.event`). Using a known event name as\n@@ -27,7 +34,7 @@ hook.<friendly-name>.enabled::\n \tSet to `false` to disable the hook without removing its\n \tconfiguration. This is particularly useful when a hook is defined\n \tin a system or global config file and needs to be disabled for a\n-\tspecific repository. See linkgit:git-hook[1].\n+\tspecific repository. {see-git-hook}\n \n hook.<friendly-name>.parallel::\n \tWhether the hook `hook.<friendly-name>` may run in parallel with other hooks\n@@ -37,13 +44,13 @@ hook.<friendly-name>.parallel::\n \tall hooks for that event run sequentially regardless of `hook.jobs`.\n \tOnly configured (named) hooks need to declare this. Traditional hooks\n \tfound in the hooks directory do not need to, and run in parallel when\n-\tthe effective job count is greater than 1. See linkgit:git-hook[1].\n+\tthe effective job count is greater than 1. {see-git-hook}\n \n hook.<event>.enabled::\n \tSwitch to enable or disable all hooks for the `<event>` hook event.\n \tWhen set to `false`, no hooks fire for that event, regardless of any\n \tper-hook `hook.<friendly-name>.enabled` settings. Defaults to `true`.\n-\tSee linkgit:git-hook[1].\n+\t{see-git-hook}\n +\n Note on naming: `<event>` must be the event name (e.g. `pre-commit`),\n not a hook friendly-name. Since using a known event name as a\n@@ -60,7 +67,7 @@ hook.<event>.jobs::\n \tsetting has no effect unless all configured hooks for the event have\n \t`hook.<friendly-name>.parallel` set to `true`. Set to `-1` to use the\n \tnumber of available CPU cores. Must be a positive integer or `-1`;\n-\tzero is rejected with a warning. See linkgit:git-hook[1].\n+\tzero is rejected with a warning. {see-git-hook}\n +\n Note on naming: although this key resembles `hook.<friendly-name>.*`\n (a per-hook setting), `<event>` must be the event name, not a hook\ndiff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc\nindex 750df58e58e..4868852aa0b 100644\n--- a/Documentation/git-hook.adoc\n+++ b/Documentation/git-hook.adoc\n@@ -204,6 +204,7 @@ unintended and unsupported ways.\n \n CONFIGURATION\n -------------\n+:git-hook: 1\n include::config/hook.adoc[]\n \n SEE ALSO\n-- \n2.54.0.13.g9c7419e39f8\n\n"},{"id":"543971","messageId":"6cea9d6c-e72e-4b71-9380-41bcae72fd79@app.fastmail.com","threadId":"65669","inReplyTo":"2832179.mvXUDI8C0e@piment-oiseau","subject":"Re: [PATCH 0/4] doc: hook: small improvements","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-05-23T11:43:30Z","receivedAt":"2026-05-23T11:43:51Z","isPatch":true,"body":"On Sat, May 23, 2026, at 12:24, Jean-Noël AVILA wrote:\n> On Thursday, 21 May 2026 18:25:54 CEST kristofferhaugsbakk@fastmail.com wrote:\n>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>>\n>> Topic name: kh/doc-hook\n>>\n>> Topic summary: Small improvements to git-hook(1) and the associated config.\n>>\n>> [1/4] doc: hook: remove stray backtick\n>> [2/4] doc: hook: consistently capitalize Git\n>> [3/4] doc: config: include existing git-hook(1) section\n>> [4/4] doc: hook: don’t self-link via config include\n>>\n>>  Documentation/config.adoc      |  2 ++\n>>  Documentation/config/hook.adoc | 19 +++++++++++++------\n>>  Documentation/git-hook.adoc    | 11 ++++++-----\n>>  3 files changed, 21 insertions(+), 11 deletions(-)\n>>\n>>\n>> base-commit: aec3f587505a472db67e9462d0702e7d463a449d\n>\n> This series looks good to me.\n\nThanks. Can I add your ack to the patches?\n"},{"id":"543973","messageId":"2832179.mvXUDI8C0e@piment-oiseau","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"Re: [PATCH 0/4] doc: hook: small improvements","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2026-05-23T10:24:13Z","receivedAt":"2026-05-23T11:49:25Z","isPatch":true,"body":"On Thursday, 21 May 2026 18:25:54 CEST kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n> \n> Topic name: kh/doc-hook\n> \n> Topic summary: Small improvements to git-hook(1) and the associated config.\n> \n> [1/4] doc: hook: remove stray backtick\n> [2/4] doc: hook: consistently capitalize Git\n> [3/4] doc: config: include existing git-hook(1) section\n> [4/4] doc: hook: don’t self-link via config include\n> \n>  Documentation/config.adoc      |  2 ++\n>  Documentation/config/hook.adoc | 19 +++++++++++++------\n>  Documentation/git-hook.adoc    | 11 ++++++-----\n>  3 files changed, 21 insertions(+), 11 deletions(-)\n> \n> \n> base-commit: aec3f587505a472db67e9462d0702e7d463a449d\n\nThis series looks good to me.\n\nThanks\n\n\n\n"},{"id":"543993","messageId":"xmqqy0h9i4js.fsf@gitster.g","threadId":"65669","inReplyTo":"6cea9d6c-e72e-4b71-9380-41bcae72fd79@app.fastmail.com","subject":"Re: [PATCH 0/4] doc: hook: small improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-05-24T08:40:23Z","receivedAt":"2026-05-24T08:40:26Z","isPatch":true,"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> On Sat, May 23, 2026, at 12:24, Jean-Noël AVILA wrote:\n>> On Thursday, 21 May 2026 18:25:54 CEST kristofferhaugsbakk@fastmail.com wrote:\n>>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>>>\n>>> Topic name: kh/doc-hook\n>>>\n>>> Topic summary: Small improvements to git-hook(1) and the associated config.\n>>>\n>>> [1/4] doc: hook: remove stray backtick\n>>> [2/4] doc: hook: consistently capitalize Git\n>>> [3/4] doc: config: include existing git-hook(1) section\n>>> [4/4] doc: hook: don’t self-link via config include\n>>>\n>>>  Documentation/config.adoc      |  2 ++\n>>>  Documentation/config/hook.adoc | 19 +++++++++++++------\n>>>  Documentation/git-hook.adoc    | 11 ++++++-----\n>>>  3 files changed, 21 insertions(+), 11 deletions(-)\n>>>\n>>>\n>>> base-commit: aec3f587505a472db67e9462d0702e7d463a449d\n>>\n>> This series looks good to me.\n>\n> Thanks. Can I add your ack to the patches?\n\nSounds good.  Typically we only honor an explicit Reviewed-by:, but\nwe add Acked-by: a lot more casually.  \"Looks good to me\" you are\nresponding is typically good enough.\n\nI'll mark the topic for 'next' in the draft edition of \"What's\ncooking\" I work off of.\n\nThanks, both.\n"},{"id":"544061","messageId":"87fr3fsql2.fsf@gentoo.mail-host-address-is-not-set","threadId":"65669","inReplyTo":"CV_doc_hook.6f0@msgid.xyz","subject":"Re: [PATCH 0/4] doc: hook: small improvements","fromName":"Adrian Ratiu","fromEmail":"adrian.ratiu@collabora.com","sentAt":"2026-05-25T10:58:49Z","receivedAt":"2026-05-25T10:59:07Z","isPatch":true,"body":"On Thu, 21 May 2026, kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> Topic name: kh/doc-hook\n>\n> Topic summary: Small improvements to git-hook(1) and the associated config.\n>\n> [1/4] doc: hook: remove stray backtick\n> [2/4] doc: hook: consistently capitalize Git\n> [3/4] doc: config: include existing git-hook(1) section\n> [4/4] doc: hook: don’t self-link via config include\n>\n>  Documentation/config.adoc      |  2 ++\n>  Documentation/config/hook.adoc | 19 +++++++++++++------\n>  Documentation/git-hook.adoc    | 11 ++++++-----\n>  3 files changed, 21 insertions(+), 11 deletions(-)\n>\n>\n> base-commit: aec3f587505a472db67e9462d0702e7d463a449d\n\nLGTM as well. Thanks!\n"},{"id":"544062","messageId":"xmqq4ijveoey.fsf@gitster.g","threadId":"65669","inReplyTo":"87fr3fsql2.fsf@gentoo.mail-host-address-is-not-set","subject":"Re: [PATCH 0/4] doc: hook: small improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-05-25T11:09:25Z","receivedAt":"2026-05-25T11:09:28Z","isPatch":true,"body":"Adrian Ratiu <adrian.ratiu@collabora.com> writes:\n\n> On Thu, 21 May 2026, kristofferhaugsbakk@fastmail.com wrote:\n>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>>\n>> Topic name: kh/doc-hook\n>>\n>> Topic summary: Small improvements to git-hook(1) and the associated config.\n>>\n>> [1/4] doc: hook: remove stray backtick\n>> [2/4] doc: hook: consistently capitalize Git\n>> [3/4] doc: config: include existing git-hook(1) section\n>> [4/4] doc: hook: don’t self-link via config include\n>>\n>>  Documentation/config.adoc      |  2 ++\n>>  Documentation/config/hook.adoc | 19 +++++++++++++------\n>>  Documentation/git-hook.adoc    | 11 ++++++-----\n>>  3 files changed, 21 insertions(+), 11 deletions(-)\n>>\n>>\n>> base-commit: aec3f587505a472db67e9462d0702e7d463a449d\n>\n> LGTM as well. Thanks!\n\nThanks, all of you.  The topic has now hit 'next'.\n"}]}