{"thread":{"id":"64960","subject":"[PATCH 0/4] doc: am: improve command linking and add am.messageId","startedAt":"2026-02-09T17:35:29Z","lastAt":"2026-02-11T17:32:47Z","messageCount":8,"participants":["kristofferhaugsbakk@fastmail.com","D. Ben Knoble","Junio C Hamano","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"535574","messageId":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","threadId":"64960","inReplyTo":null,"subject":"[PATCH 0/4] doc: am: improve command linking and add am.messageId","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-09T17:34:33Z","receivedAt":"2026-02-09T17:35:29Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nTopic name: kh/doc-am-messageid\n\nTopic summary: I noticed that `am.messageId` was not documented. In the\nprocess I thought that the way that git-am(1) refers to commands is a\nbit off. Replace all things like 'git am'/`git rebase` with\n`linkgit`. Also fill out hook documentation.\n\nNotes to the maintainer: this conflicts with topic\nkh/doc-am-format-sendmail in `seen` because of an adjacent paragraph.\n\nKristoffer Haugsbakk (4):\n  doc: am: normalize git(1) command links\n  doc: am: say that --message-id adds a trailer\n  doc: am: add missing config am.messageId\n  doc: am: fill out hook discussion\n\n Documentation/config/am.adoc | 24 +++++++++------\n Documentation/git-am.adoc    | 58 ++++++++++++++++++++----------------\n 2 files changed, 47 insertions(+), 35 deletions(-)\n\n\nbase-commit: 67ad42147a7acc2af6074753ebd03d904476118f\n-- \n2.53.0.26.g2afa8602a26\n\n"},{"id":"535575","messageId":"git-am_gitlinks.322@msgid.xyz","threadId":"64960","inReplyTo":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","subject":"[PATCH 1/4] doc: am: normalize git(1) command links","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-09T17:34:34Z","receivedAt":"2026-02-09T17:35:48Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThere are many mentions of commands using inline-verbatim or\nemphasis ('). We just mention the command themselves, not specific\ninvocations like `git am <opts>`. Let’s link to them instead.\n\nThere are also many such mentions which then link to the command right\nafterwards. Simplify to just using a link.\n\nAlso remove “see <gitlink>” phrases where they have now already\nbeen mentioned.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/config/am.adoc | 18 +++++++++---------\n Documentation/git-am.adoc    | 31 +++++++++++++++----------------\n 2 files changed, 24 insertions(+), 25 deletions(-)\n\ndiff --git a/Documentation/config/am.adoc b/Documentation/config/am.adoc\nindex 5bcad2efb11..19ef5aa00c4 100644\n--- a/Documentation/config/am.adoc\n+++ b/Documentation/config/am.adoc\n@@ -1,14 +1,14 @@\n am.keepcr::\n-\tIf true, git-am will call git-mailsplit for patches in mbox format\n-\twith parameter `--keep-cr`. In this case git-mailsplit will\n+\tIf true, linkgit:git-am[1] will call linkgit:git-mailsplit[1]\n+\tfor patches in mbox format with parameter `--keep-cr`. In this\n+\tcase linkgit:git-mailsplit[1] will\n \tnot remove `\\r` from lines ending with `\\r\\n`. Can be overridden\n \tby giving `--no-keep-cr` from the command line.\n-\tSee linkgit:git-am[1], linkgit:git-mailsplit[1].\n \n am.threeWay::\n-\tBy default, `git am` will fail if the patch does not apply cleanly. When\n-\tset to true, this setting tells `git am` to fall back on 3-way merge if\n-\tthe patch records the identity of blobs it is supposed to apply to and\n-\twe have those blobs available locally (equivalent to giving the `--3way`\n-\toption from the command line). Defaults to `false`.\n-\tSee linkgit:git-am[1].\n+\tBy default, linkgit:git-am[1] will fail if the patch does not\n+\tapply cleanly. When set to true, this setting tells\n+\tlinkgit:git-am[1] to fall back on 3-way merge if the patch\n+\trecords the identity of blobs it is supposed to apply to and we\n+\thave those blobs available locally (equivalent to giving the\n+\t`--3way` option from the command line). Defaults to `false`.\ndiff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc\nindex 0c94776e296..70c605b4156 100644\n--- a/Documentation/git-am.adoc\n+++ b/Documentation/git-am.adoc\n@@ -43,14 +43,14 @@ OPTIONS\n \n -k::\n --keep::\n-\tPass `-k` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).\n+\tPass `-k` flag to linkgit:git-mailinfo[1].\n \n --keep-non-patch::\n-\tPass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).\n+\tPass `-b` flag to linkgit:git-mailinfo[1].\n \n --keep-cr::\n --no-keep-cr::\n-\tWith `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])\n+\tWith `--keep-cr`, call linkgit:git-mailsplit[1]\n \twith the same option, to prevent it from stripping CR at the end of\n \tlines. `am.keepcr` configuration variable can be used to specify the\n \tdefault behaviour.  `--no-keep-cr` is useful to override `am.keepcr`.\n@@ -65,7 +65,7 @@ OPTIONS\n \tIgnore scissors lines (see linkgit:git-mailinfo[1]).\n \n --quoted-cr=<action>::\n-\tThis flag will be passed down to 'git mailinfo' (see linkgit:git-mailinfo[1]).\n+\tThis flag will be passed down to linkgit:git-mailinfo[1].\n \n --empty=(drop|keep|stop)::\n \tHow to handle an e-mail message lacking a patch:\n@@ -83,7 +83,7 @@ OPTIONS\n \n -m::\n --message-id::\n-\tPass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]),\n+\tPass the `-m` flag to linkgit:git-mailinfo[1],\n \tso that the Message-ID header is added to the commit message.\n \tThe `am.messageid` configuration variable can be used to specify\n \tthe default behaviour.\n@@ -98,7 +98,7 @@ OPTIONS\n \n -u::\n --utf8::\n-\tPass `-u` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).\n+\tPass `-u` flag to linkgit:git-mailinfo[1].\n \tThe proposed commit log message taken from the e-mail\n \tis re-coded into UTF-8 encoding (configuration variable\n \t`i18n.commitEncoding` can be used to specify the project's\n@@ -108,8 +108,7 @@ This was optional in prior versions of git, but now it is the\n default.   You can use `--no-utf8` to override this.\n \n --no-utf8::\n-\tPass `-n` flag to 'git mailinfo' (see\n-\tlinkgit:git-mailinfo[1]).\n+\tPass `-n` flag to linkgit:git-mailinfo[1].\n \n -3::\n --3way::\n@@ -132,9 +131,8 @@ include::rerere-options.adoc[]\n --exclude=<path>::\n --include=<path>::\n --reject::\n-\tThese flags are passed to the 'git apply' (see linkgit:git-apply[1])\n-\tprogram that applies\n-\tthe patch.\n+\tThese flags are passed to the linkgit:git-apply[1] program that\n+\tapplies the patch.\n +\n Valid <action> for the `--whitespace` option are:\n `nowarn`, `warn`, `fix`, `error`, and `error-all`.\n@@ -205,7 +203,8 @@ applying.\n \tto the screen before exiting.  This overrides the\n \tstandard message informing you to use `--continue`\n \tor `--skip` to handle the failure.  This is solely\n-\tfor internal use between 'git rebase' and 'git am'.\n+\tfor internal use between linkgit:git-rebase[1] and\n+\tlinkgit:git-am[1].\n \n --abort::\n \tRestore the original branch and abort the patching operation.\n@@ -223,7 +222,7 @@ applying.\n \tfailure again.\n \n --show-current-patch[=(diff|raw)]::\n-\tShow the message at which `git am` has stopped due to\n+\tShow the message at which linkgit:git-am[1] has stopped due to\n \tconflicts.  If `raw` is specified, show the raw contents of\n \tthe e-mail message; if `diff`, show the diff portion only.\n \tDefaults to `raw`.\n@@ -261,7 +260,7 @@ message.  Any line that is of the form:\n is taken as the beginning of a patch, and the commit log message\n is terminated before the first occurrence of such a line.\n \n-When initially invoking `git am`, you give it the names of the mailboxes\n+When initially invoking linkgit:git-am[1], you give it the names of the mailboxes\n to process.  Upon seeing the first patch that does not apply, it\n aborts in the middle.  You can recover from this in one of two ways:\n \n@@ -279,8 +278,8 @@ names.\n \n Before any patches are applied, ORIG_HEAD is set to the tip of the\n current branch.  This is useful if you have problems with multiple\n-commits, like running 'git am' on the wrong branch or an error in the\n-commits that is more easily fixed by changing the mailbox (e.g.\n+commits, like running linkgit:git-am[1] on the wrong branch or an error\n+in the commits that is more easily fixed by changing the mailbox (e.g.\n errors in the \"From:\" lines).\n \n HOOKS\n-- \n2.53.0.26.g2afa8602a26\n\n"},{"id":"535576","messageId":"message-id_trailer.323@msgid.xyz","threadId":"64960","inReplyTo":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","subject":"[PATCH 2/4] doc: am: say that --message-id adds a trailer","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-09T17:34:35Z","receivedAt":"2026-02-09T17:36:06Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nThe option `--message-id` was added in a078f732 (git-am: add\n--message-id/--no-message-id, 2014-11-25) back when git-interpret-\ntrailers(1) was relatively new. Let’s spell out that it is a trailer\nand link to the dedicated trailer command.\n\nAlso use inline-verbatim for `Message-ID`.\n\nAlso link to git-interpret-trailers(1) on `--signoff`.\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/git-am.adoc | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc\nindex 70c605b4156..5e0d6e6fe02 100644\n--- a/Documentation/git-am.adoc\n+++ b/Documentation/git-am.adoc\n@@ -37,9 +37,10 @@ OPTIONS\n \n -s::\n --signoff::\n-\tAdd a `Signed-off-by` trailer to the commit message, using\n-\tthe committer identity of yourself.\n-\tSee the signoff option in linkgit:git-commit[1] for more information.\n+\tAdd a `Signed-off-by` trailer to the commit message (see\n+\tlinkgit:git-interpret-trailers[1]), using the committer identity\n+\tof yourself.  See the signoff option in linkgit:git-commit[1]\n+\tfor more information.\n \n -k::\n --keep::\n@@ -83,10 +84,11 @@ OPTIONS\n \n -m::\n --message-id::\n-\tPass the `-m` flag to linkgit:git-mailinfo[1],\n-\tso that the Message-ID header is added to the commit message.\n-\tThe `am.messageid` configuration variable can be used to specify\n-\tthe default behaviour.\n+\tPass the `-m` flag to linkgit:git-mailinfo[1], so that the\n+\t`Message-ID` header is added as a trailer (see\n+\tlinkgit:git-interpret-trailers[1]).  The `am.messageid`\n+\tconfiguration variable can be used to specify the default\n+\tbehaviour.\n \n --no-message-id::\n \tDo not add the Message-ID header to the commit message.\n-- \n2.53.0.26.g2afa8602a26\n\n"},{"id":"535577","messageId":"add_am.messageId.324@msgid.xyz","threadId":"64960","inReplyTo":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","subject":"[PATCH 3/4] doc: am: add missing config am.messageId","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-09T17:34:36Z","receivedAt":"2026-02-09T17:36:24Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n Documentation/config/am.adoc | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/Documentation/config/am.adoc b/Documentation/config/am.adoc\nindex 19ef5aa00c4..e9561e12d74 100644\n--- a/Documentation/config/am.adoc\n+++ b/Documentation/config/am.adoc\n@@ -12,3 +12,9 @@ am.threeWay::\n \trecords the identity of blobs it is supposed to apply to and we\n \thave those blobs available locally (equivalent to giving the\n \t`--3way` option from the command line). Defaults to `false`.\n+\n+am.messageId::\n+\tAdd a `Message-ID` trailer based on the email header to the\n+\tcommit when using linkgit:git-am[1] (see\n+\tlinkgit:git-interpret-trailers[1]). See also the `--message-id`\n+\tand `--no-message-id` options.\n-- \n2.53.0.26.g2afa8602a26\n\n"},{"id":"535578","messageId":"am_hooks.325@msgid.xyz","threadId":"64960","inReplyTo":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","subject":"[PATCH 4/4] doc: am: fill out hook discussion","fromName":"","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-02-09T17:34:37Z","receivedAt":"2026-02-09T17:36:43Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nDocument `--verify` and rephrase the `--[no-]verify` section to lead\nwith the default, in imperative mood.[1]\n\nHistorically it makes sense that only the negated forms are documented;\nthey are all run by default and thus you only need to use hook options\nif you want to turn some of them off. But, beyond just desiring uniform\ndocumentation,[2] it’s very much possible to have, say, a Git alias with\n`--no-verify` that you might sometimes want to turn back on with\nthe *positive* form.\n\nAlso mention the options in the “Hooks” section and mention that\n`post-applypatch` cannot be skipped.\n\n† 1: See e.g. acffc5e9 (doc: convert git-remote to synopsis style,\n     2025-12-20)\n† 2: https://lore.kernel.org/git/xmqqcyct1mtq.fsf@gitster.g/\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n\nNotes (series):\n    Does not need an update to the usage in `builtin/am.c` because it is\n    excluded in `t/t0450/adoc-help-mismatches`.\n\n Documentation/git-am.adoc | 13 +++++++++----\n 1 file changed, 9 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc\nindex 5e0d6e6fe02..84ec9fee8df 100644\n--- a/Documentation/git-am.adoc\n+++ b/Documentation/git-am.adoc\n@@ -9,7 +9,7 @@ git-am - Apply a series of patches from a mailbox\n SYNOPSIS\n --------\n [verse]\n-'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--no-verify]\n+'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]\n \t [--[no-]3way] [--interactive] [--committer-date-is-author-date]\n \t [--ignore-date] [--ignore-space-change | --ignore-whitespace]\n \t [--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]\n@@ -150,11 +150,14 @@ Valid <action> for the `--whitespace` option are:\n --interactive::\n \tRun interactively.\n \n+--verify::\n -n::\n --no-verify::\n-\tBy default, the pre-applypatch and applypatch-msg hooks are run.\n-\tWhen any of `--no-verify` or `-n` is given, these are bypassed.\n-\tSee also linkgit:githooks[5].\n+\tRun the `pre-applypatch` and `applypatch-msg` hooks. This is the\n+\tdefault. Skip these hooks with `-n` or `--no-verify`. See also\n+\tlinkgit:githooks[5].\n++\n+Note that `post-applypatch` cannot be skipped.\n \n --committer-date-is-author-date::\n \tBy default the command records the date from the e-mail\n@@ -290,6 +293,8 @@ This command can run `applypatch-msg`, `pre-applypatch`,\n and `post-applypatch` hooks.  See linkgit:githooks[5] for more\n information.\n \n+See the `--verify`/`-n`/`--no-verify` options.\n+\n CONFIGURATION\n -------------\n \n-- \n2.53.0.26.g2afa8602a26\n\n"},{"id":"535607","messageId":"CALnO6CBTWTqfVNerHQb0X4Y4UKXggRdqzgXqYKd_O05shC+jNA@mail.gmail.com","threadId":"64960","inReplyTo":"doc_am_gitlinks_and_am.messageId.321@msgid.xyz","subject":"Re: [PATCH 0/4] doc: am: improve command linking and add am.messageId","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-02-09T21:57:45Z","receivedAt":"2026-02-09T21:57:56Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"On Mon, Feb 9, 2026 at 12:35 PM <kristofferhaugsbakk@fastmail.com> wrote:\n>\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> Topic name: kh/doc-am-messageid\n>\n> Topic summary: I noticed that `am.messageId` was not documented. In the\n> process I thought that the way that git-am(1) refers to commands is a\n> bit off. Replace all things like 'git am'/`git rebase` with\n> `linkgit`. Also fill out hook documentation.\n>\n> Notes to the maintainer: this conflicts with topic\n> kh/doc-am-format-sendmail in `seen` because of an adjacent paragraph.\n>\n> Kristoffer Haugsbakk (4):\n>   doc: am: normalize git(1) command links\n>   doc: am: say that --message-id adds a trailer\n>   doc: am: add missing config am.messageId\n>   doc: am: fill out hook discussion\n>\n>  Documentation/config/am.adoc | 24 +++++++++------\n>  Documentation/git-am.adoc    | 58 ++++++++++++++++++++----------------\n>  2 files changed, 47 insertions(+), 35 deletions(-)\n>\n>\n> base-commit: 67ad42147a7acc2af6074753ebd03d904476118f\n> --\n> 2.53.0.26.g2afa8602a26\n\nFrom a quick glance I don't spot any issues. Thanks!\n\n-- \nD. Ben Knoble\n"},{"id":"535612","messageId":"xmqqv7g536cn.fsf@gitster.g","threadId":"64960","inReplyTo":"CALnO6CBTWTqfVNerHQb0X4Y4UKXggRdqzgXqYKd_O05shC+jNA@mail.gmail.com","subject":"Re: [PATCH 0/4] doc: am: improve command linking and add am.messageId","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-09T22:22:16Z","receivedAt":"2026-02-09T22:22:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"D. Ben Knoble\" <ben.knoble@gmail.com> writes:\n\n> On Mon, Feb 9, 2026 at 12:35 PM <kristofferhaugsbakk@fastmail.com> wrote:\n>>\n>> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>>\n>> Topic name: kh/doc-am-messageid\n>>\n>> Topic summary: I noticed that `am.messageId` was not documented. In the\n>> process I thought that the way that git-am(1) refers to commands is a\n>> bit off. Replace all things like 'git am'/`git rebase` with\n>> `linkgit`. Also fill out hook documentation.\n>>\n>> Notes to the maintainer: this conflicts with topic\n>> kh/doc-am-format-sendmail in `seen` because of an adjacent paragraph.\n>>\n>> Kristoffer Haugsbakk (4):\n>>   doc: am: normalize git(1) command links\n>>   doc: am: say that --message-id adds a trailer\n>>   doc: am: add missing config am.messageId\n>>   doc: am: fill out hook discussion\n>>\n>>  Documentation/config/am.adoc | 24 +++++++++------\n>>  Documentation/git-am.adoc    | 58 ++++++++++++++++++++----------------\n>>  2 files changed, 47 insertions(+), 35 deletions(-)\n>>\n>>\n>> base-commit: 67ad42147a7acc2af6074753ebd03d904476118f\n>> --\n>> 2.53.0.26.g2afa8602a26\n>\n> From a quick glance I don't spot any issues. Thanks!\n\nYeah, thanks, both.  Queued.\n"},{"id":"535786","messageId":"1a05ca33-dda0-4315-970d-b61a3f48a8f4@app.fastmail.com","threadId":"64960","inReplyTo":"git-am_gitlinks.322@msgid.xyz","subject":"Re: [PATCH 1/4] doc: am: normalize git(1) command links","fromName":"Kristoffer Haugsbakk","fromEmail":"code@khaugsbakk.name","sentAt":"2026-02-11T17:32:15Z","receivedAt":"2026-02-11T17:32:47Z","isPatch":true,"sender":{"key":"code@khaugsbakk.name","avatar":"https://avatars.githubusercontent.com/u/2229597?v=4"},"body":"On Mon, Feb 9, 2026, at 18:34, kristofferhaugsbakk@fastmail.com wrote:\n> From: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>\n> There are many mentions of commands using inline-verbatim or\n> emphasis ('). We just mention the command themselves, not specific\n> invocations like `git am <opts>`. Let’s link to them instead.\n>\n> There are also many such mentions which then link to the command right\n> afterwards. Simplify to just using a link.\n>\n> Also remove “see <gitlink>” phrases where they have now already\n> been mentioned.\n>\n> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n>[snip]\n> diff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc\n>[snip]\n>  Valid <action> for the `--whitespace` option are:\n>  `nowarn`, `warn`, `fix`, `error`, and `error-all`.\n> @@ -205,7 +203,8 @@ applying.\n>  \tto the screen before exiting.  This overrides the\n>  \tstandard message informing you to use `--continue`\n>  \tor `--skip` to handle the failure.  This is solely\n> -\tfor internal use between 'git rebase' and 'git am'.\n> +\tfor internal use between linkgit:git-rebase[1] and\n> +\tlinkgit:git-am[1].\n\nJean-Noël, regarding [this]. This change adds a lot of self-references:\ngit-am(1) inside the git-am(1) doc. Is that problematic?\n\n[this]: https://lore.kernel.org/git/1a4060f1-6607-4b50-859d-927642eb34df@free.fr/\n\n>[snip]\n"}]}