]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: interpret-trailers: explain key format
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Thu, 30 Jul 2026 09:18:19 +0000 (11:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2026 16:10:14 +0000 (09:10 -0700)
A trailer key must consist of ASCII alphanumeric characters and
hyphens *only*. Let’s document it explicitly instead of relying on
readers being conservative and only basing their trailer keys on the
documentation examples.[1]

The previous commit provided us with an appropriate paragraph to
describe the key format.

† 1: Technically they would then miss out on using digits in them since
     all of the example keys just use letters and hyphens

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

index 109059f11edc6672e5ebec2da55d0f6d8804aab1..fb503cbe9528ce325a65dbdaa8ef6feacd039e89 100644 (file)
@@ -18,7 +18,8 @@ Add or parse trailer metadata at the end of the otherwise
 free-form part of a commit message, or any other kind of text.
 
 A _trailer_ in its simplest form is a key-value pair with a colon as a
-separator. A _trailer block_ consists of one or more trailers. The
+separator. The _key_ consists of ASCII alphanumeric characters and
+hyphens (`-`). A _trailer block_ consists of one or more trailers. The
 trailer block needs to be preceded by a blank line, where a _blank line_
 is either an empty or a whitespace-only line. For example, in the
 following commit message