Subject: [PATCH 2/2] doc: interpret-trailers: explain key format

From: [email-masked]
Date: Mon, 30 Mar 2026 23:11:33 +0200

From: Kristoffer Haugsbakk <[email-masked]>

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 painting their trailers by numbers
(by the documentation examples).

The previous commit for “key–value pairs” allows us to segue right into
describing these lines as consisting of a key and a value, which is our
opening to describing the key format.

Just like *trailer* we emphasize these two first standalone word
mentions. They are then mostly used in placeholders throughout the rest
of the document (<key> and <value>).

Reported-by: Brendan Jackman <[email-masked]>
Signed-off-by: Kristoffer Haugsbakk <[email-masked]>
---

Notes (series):
    `trailer.c` uses `isalnum()`. That short research together with a little
    testing left me with this conclusion. (The C unit tests for trailers and
    t7513-interpret-trailers.sh seem to just use lines with spaces and no
    separators for non-trailer lines.)

 Documentation/git-interpret-trailers.adoc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-interpret-trailers.adoc b/Documentation/git-interpret-trailers.adoc
index e7c1f821619..92d9c95f9d2 100644
--- a/Documentation/git-interpret-trailers.adoc
+++ b/Documentation/git-interpret-trailers.adoc
@@ -27,7 +27,10 @@ Signed-off-by: Alice <[email-masked]>
 Signed-off-by: Bob <[email-masked]>
 ------------------------------------------------
 
-the last two lines starting with `Signed-off-by` are trailers.
+the last two lines starting with `Signed-off-by` are trailers. These two
+trailers have the _key_ `Signed-off-by` and a _value_ (Alice and Bob).
+The key must consist of only ASCII alphanumeric characters and hyphens
+(`-`). The hyphens serve as interword separators.
 
 This command reads commit messages from either the
 _<file>_ arguments or the standard input if no _<file>_ is specified.
-- 
2.53.0.32.gf6228eaf9cc