[PATCH v2 9/9] doc: intepret-trailers: document comment line treatment
- From
- kristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
- Date
- Apr 13, 2026, 10:21 UTC
- Message-ID
- <V2_trailer_comment_lines.61c@msgid.xyz>
- In-Reply-To
- <V2_CV_doc_int-tr_key_format.613@msgid.xyz>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Comment lines have always been ignored but this is not documented.
This is mostly for completeness since this is unlikely to catch anyone by surprise. But we really ought to be reasonably complete here since it’s the only documentation page that documents trailers.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> ---
Notes (series):
v2: [new]Documentation/git-interpret-trailers.adoc | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/Documentation/git-interpret-trailers.adoc b/Documentation/git-interpret-trailers.adoc index b693e89fd96..b42f957d666 100644 --- a/Documentation/git-interpret-trailers.adoc +++ b/Documentation/git-interpret-trailers.adoc @@ -103,6 +103,10 @@ of the message in turn is either (i) at the end of the input, or (ii) the last non-whitespace lines before a line that starts with `---` (followed by a space or the end of the line). +This command ignores comment lines (see `core.commentString` in +linkgit:git-config[1]). This is for use with the `prepare-commit-msg` +and `commit-msg` hooks. + When reading trailers, there can be no whitespace before or inside the _<key>_, but any number of regular space and tab characters are allowed between the _<key>_ and the separator. There can be whitespaces before,
-- 2.53.0.32.gf6228eaf9cc