doc: interpret-trailers: explain key format
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>
Kristoffer Haugsbakk committed
Jul 30, 2026 at 11:18 UTC
515eaf9a72123ad23c7518f7eb18f920d5be674b
1 file changed
+2
-1
Documentation/git-interpret-trailers.adoc
+2
-1
@@ -18,7 +18,8 @@ Add or parse trailer metadata at the end of the otherwise
18
free-form part of a commit message, or any other kind of text.
19
20
A _trailer_ in its simplest form is a key-value pair with a colon as a
21
-separator. A _trailer block_ consists of one or more trailers. The
21
+separator. The _key_ consists of ASCII alphanumeric characters and
22
+hyphens (`-`). A _trailer block_ consists of one or more trailers. The
23
trailer block needs to be preceded by a blank line, where a _blank line_
24
is either an empty or a whitespace-only line. For example, in the
25
following commit message