]> git.ipfire.org Git - thirdparty/git.git/commit
doc: interpret-trailers: document comment line treatment
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Thu, 30 Jul 2026 09:18:24 +0000 (11:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2026 16:10:14 +0000 (09:10 -0700)
commita8fc20da22f04fbe6557d38926a6a703ffed8a40
tree0a6bf5c440e3363a355479d5d1e0a8d2a77b3c41
parent55afc1f9aa7a2992d4ea684a0091cdb1cf5efdae
doc: interpret-trailers: document comment line treatment

Comment lines have always been ignored but this is not documented.

The primary motivation here is to reasonably complete in the
documentation of how trailers are parsed; this is after all the only
documentation page that documents this format. However, and going beyond
that point, we could imagine that someone would want to use this format
outside a commit (or tag) message context, like say in Git notes.

On the other hand, it seems far-fetched that someone would be caught
off guard by this considering that comment characters/strings are not
likely to be alphanumeric,[1] which would mean that these comment lines
would be treated as non-trailer lines if they were *not* detected and
removed as comment lines.

† 1: A notable exception is that Jujutsu VCS uses `JJ:` as
     the comment string

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-interpret-trailers.adoc