Commit

cb657364d5c3b82bc32e22fe1eca445d9960032b

doc: interpret-trailers: rewrite new-trailers paragraphs

Two commits ago we moved new-trailers paragraph next to each other.
But there is something curious about two of them:

    By default the new trailer will appear at the end of the trailer
    block. [...]

Then a source block and a paragraph later:

    By default, a `<key>=<value>` or `<key>:<value>` argument given
    using `--trailer` will be appended after the existing trailers only
    if [...]

Why are there two paragraphs that talk about how “By default” a trailer
will be appended?

We can make these paragraphs flow better, and with a more distinct
character each, by dividing the flow like this:

1. Declare that we are about to talk about `--trailer` appending
2. Explain the default behavior
3. Explain how this affects the trailer block
4. Then discuss what each trailer line will look like

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kristoffer Haugsbakk <code@khaugsbakk.name> · 2026-08-09 20:06 UTC · committed by Junio C Hamano

Browse files
1 file changed, +12 −10
modified Documentation/git-interpret-trailers.adoc
@@ -60,10 +60,18 @@ are applied to each input and the way any existing trailer in
60 60 the input is changed. They also make it possible to
61 61 automatically add some trailers.
62 62
63 - By default, a `<key>=<value>` or `<key>:<value>` argument given
64 - using `--trailer` will be appended after the existing trailers only if
65 - the last trailer has a different (_<key>_, _<value>_) pair (or if there
66 - is no existing trailer). The _<key>_ and _<value>_ parts will be trimmed
63 + Let's consider new trailers added with `--trailer`.
64 + By default, the new trailer will appear at the end of the trailer block.
65 + Also by default, this new trailer will only be added
66 + if the last trailer is different to it.
67 + A trailer block will be created with only that trailer if a trailer
68 + block does not already exist. Recall that a trailer block needs to be
69 + preceded by a blank line, so a blank line will be inserted before the
70 + new trailer block in that case.
71 +
72 + This is how the new trailer is added: a `<key>=<value>` or
73 + `<key>:<value>` argument given using `--trailer` will be appended after
74 + the existing trailers. The _<key>_ and _<value>_ parts will be trimmed
67 75 to remove starting and trailing whitespace, and the resulting trimmed
68 76 _<key>_ and _<value>_ will appear in the output like this:
69 77
@@ -74,12 +82,6 @@ key: value
74 82 This means that the trimmed _<key>_ and _<value>_ will be separated by
75 83 "`:`{nbsp}" (one colon followed by one space).
76 84
77 - By default the new trailer will appear at the end of the trailer block.
78 - A trailer block will be created with only that trailer if a trailer
79 - block does not already exist. Recall that a trailer block needs to be
80 - preceded by a blank line, so a blank line will be inserted before the
81 - new trailer block in that case.
82 -
83 85 Existing trailers are extracted from the input by looking for the
84 86 trailer block. A trailer block is a group of one or more lines that (i)
85 87 is all trailers, or (ii) contains at least one Git-generated or