]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: interpret-trailers: document comment line treatment
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Mon, 13 Apr 2026 10:21:08 +0000 (12:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Apr 2026 16:04:40 +0000 (09:04 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-interpret-trailers.adoc

index b693e89fd963368be6ff7e1d01c1fa6532febcae..b42f957d66638da08b8b502a1a93c4ce2d706139 100644 (file)
@@ -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,