Subject: [PATCH v2 9/9] doc: intepret-trailers: document comment line treatment

From: [email-masked]
Date: Mon, 13 Apr 2026 12:21:08 +0200

From: Kristoffer Haugsbakk <[email-masked]>

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 <[email-masked]>
---

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