Skip to content

Commit d1673e5

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: interpret-trailers: explain the format after the intro
You need to read the entire “Description” section in order to understand the full trailer format. But there are many nuances, so that’s fine. As a starter though we have an introductory example.[1] That turns out to be crucial; the rest of this section talks about the mechanics of the command and only incidentally the format itself. Now, although the example might arguably be self-explanatory, we can add a little preamble which defines the format in its simplest form as well as define the most important terms. Note that we name the “blank line” rule since I want to use that term every time it comes up. It gets very mildly obfuscated if you call it a “blank line” in one place[2] and “empty (or whitespace-only) ...” in another one.[3] We will define the format of the *key* in the next commit. † 1: from d57fa7f (doc: trailer: add more examples in DESCRIPTION, 2023-06-15) † 2: `Documentation/git-interpret-trailers.adoc:86` in 5361983 (The 22nd batch, 2026-03-27) † 3: `Documentation/git-interpret-trailers.adoc:93` in 5361983 (The 22nd batch, 2026-03-27) Suggested-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 9fb4744 commit d1673e5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Documentation/git-interpret-trailers.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ DESCRIPTION
1616
-----------
1717
Add or parse trailers metadata at the end of the otherwise
1818
free-form part of a commit message, or any other kind of text.
19-
For example, in the following commit message
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
22+
trailer block needs to be preceded by a blank line, where a _blank line_
23+
is either an empty or a whitespace-only line. For example, in the
24+
following commit message
2025

2126
------------------------------------------------
2227
subject

0 commit comments

Comments
 (0)