Skip to content

Commit 229d6ab

Browse files
Linus Arvergitster
authored andcommitted
doc: trailer: examples: avoid the word "message" by itself
Previously, "message" could mean the input, output, commit message, or "internal body text inside the commit message" (in the EXAMPLES section). Avoid overloading this term by using the appropriate meanings explicitly. Signed-off-by: Linus Arver <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 94f15fe commit 229d6ab

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

Documentation/git-interpret-trailers.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ OPTIONS
8383

8484
--trim-empty::
8585
If the <value> part of any trailer contains only whitespace,
86-
the whole trailer will be removed from the resulting message.
86+
the whole trailer will be removed from the output.
8787
This applies to existing trailers as well as new trailers.
8888

8989
--trailer <token>[(=|:)<value>]::
9090
Specify a (<token>, <value>) pair that should be applied as a
91-
trailer to the input messages. See the description of this
91+
trailer to the inputs. See the description of this
9292
command.
9393

9494
--where <placement>::
@@ -102,7 +102,7 @@ OPTIONS
102102
--if-exists <action>::
103103
--no-if-exists::
104104
Specify what action will be performed when there is already at
105-
least one trailer with the same <token> in the message. A setting
105+
least one trailer with the same <token> in the input. A setting
106106
provided with '--if-exists' overrides all configuration variables
107107
and applies to all '--trailer' options until the next occurrence of
108108
'--if-exists' or '--no-if-exists'. Possible actions are `addIfDifferent`,
@@ -111,7 +111,7 @@ OPTIONS
111111
--if-missing <action>::
112112
--no-if-missing::
113113
Specify what action will be performed when there is no other
114-
trailer with the same <token> in the message. A setting
114+
trailer with the same <token> in the input. A setting
115115
provided with '--if-missing' overrides all configuration variables
116116
and applies to all '--trailer' options until the next occurrence of
117117
'--if-missing' or '--no-if-missing'. Possible actions are `doNothing`
@@ -178,7 +178,7 @@ first trailer with the same <token>.
178178
trailer.ifexists::
179179
This option makes it possible to choose what action will be
180180
performed when there is already at least one trailer with the
181-
same <token> in the message.
181+
same <token> in the input.
182182
+
183183
The valid values for this option are: `addIfDifferentNeighbor` (this
184184
is the default), `addIfDifferent`, `add`, `replace` or `doNothing`.
@@ -188,23 +188,23 @@ trailer with the same (<token>, <value>) pair is above or below the line
188188
where the new trailer will be added.
189189
+
190190
With `addIfDifferent`, a new trailer will be added only if no trailer
191-
with the same (<token>, <value>) pair is already in the message.
191+
with the same (<token>, <value>) pair is already in the input.
192192
+
193193
With `add`, a new trailer will be added, even if some trailers with
194-
the same (<token>, <value>) pair are already in the message.
194+
the same (<token>, <value>) pair are already in the input.
195195
+
196196
With `replace`, an existing trailer with the same <token> will be
197197
deleted and the new trailer will be added. The deleted trailer will be
198198
the closest one (with the same <token>) to the place where the new one
199199
will be added.
200200
+
201201
With `doNothing`, nothing will be done; that is no new trailer will be
202-
added if there is already one with the same <token> in the message.
202+
added if there is already one with the same <token> in the input.
203203

204204
trailer.ifmissing::
205205
This option makes it possible to choose what action will be
206206
performed when there is not yet any trailer with the same
207-
<token> in the message.
207+
<token> in the input.
208208
+
209209
The valid values for this option are: `add` (this is the default) and
210210
`doNothing`.
@@ -276,37 +276,37 @@ EXAMPLES
276276
--------
277277

278278
* Configure a 'sign' trailer with a 'Signed-off-by' key, and then
279-
add two of these trailers to a message:
279+
add two of these trailers to a commit message file:
280280
+
281281
------------
282282
$ git config trailer.sign.key "Signed-off-by"
283283
$ cat msg.txt
284284
subject
285285

286-
message
286+
body text
287287
$ git interpret-trailers --trailer 'sign: Alice <[email protected]>' --trailer 'sign: Bob <[email protected]>' <msg.txt
288288
subject
289289

290-
message
290+
body text
291291

292292
Signed-off-by: Alice <[email protected]>
293293
Signed-off-by: Bob <[email protected]>
294294
------------
295295

296-
* Use the `--in-place` option to edit a message file in place:
296+
* Use the `--in-place` option to edit a commit message file in place:
297297
+
298298
------------
299299
$ cat msg.txt
300300
subject
301301

302-
message
302+
body text
303303

304304
Signed-off-by: Bob <[email protected]>
305305
$ git interpret-trailers --trailer 'Acked-by: Alice <[email protected]>' --in-place msg.txt
306306
$ cat msg.txt
307307
subject
308308

309-
message
309+
body text
310310

311311
Signed-off-by: Bob <[email protected]>
312312
Acked-by: Alice <[email protected]>
@@ -329,27 +329,27 @@ $ git interpret-trailers --trailer 'Cc: Alice <[email protected]>' --trailer 'Re
329329
$ cat msg1.txt
330330
subject
331331

332-
message
332+
body text
333333
$ git config trailer.sign.key "Signed-off-by: "
334334
$ git config trailer.sign.ifmissing add
335335
$ git config trailer.sign.ifexists doNothing
336336
$ git config trailer.sign.cmd 'echo "$(git config user.name) <$(git config user.email)>"'
337337
$ git interpret-trailers --trailer sign <msg1.txt
338338
subject
339339

340-
message
340+
body text
341341

342342
Signed-off-by: Bob <[email protected]>
343343
$ cat msg2.txt
344344
subject
345345

346-
message
346+
body text
347347

348348
Signed-off-by: Alice <[email protected]>
349349
$ git interpret-trailers --trailer sign <msg2.txt
350350
subject
351351

352-
message
352+
body text
353353

354354
Signed-off-by: Alice <[email protected]>
355355
------------
@@ -377,14 +377,14 @@ test -n "$1" && git log --author="$1" --pretty="%an <%ae>" -1 || true
377377
$ cat msg.txt
378378
subject
379379

380-
message
380+
body text
381381
$ git config trailer.help.key "Helped-by: "
382382
$ git config trailer.help.ifExists "addIfDifferentNeighbor"
383383
$ git config trailer.help.cmd "~/bin/glog-find-author"
384384
$ git interpret-trailers --trailer="help:Junio" --trailer="help:Couder" <msg.txt
385385
subject
386386

387-
message
387+
body text
388388

389389
Helped-by: Junio C Hamano <[email protected]>
390390
Helped-by: Christian Couder <[email protected]>
@@ -401,14 +401,14 @@ test -n "$1" && git log --grep "$1" --pretty=reference -1 || true
401401
$ cat msg.txt
402402
subject
403403

404-
message
404+
body text
405405
$ git config trailer.ref.key "Reference-to: "
406406
$ git config trailer.ref.ifExists "replace"
407407
$ git config trailer.ref.cmd "~/bin/glog-grep"
408408
$ git interpret-trailers --trailer="ref:Add copyright notices." <msg.txt
409409
subject
410410

411-
message
411+
body text
412412

413413
Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
414414
------------
@@ -420,7 +420,7 @@ Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
420420
$ cat msg.txt
421421
subject
422422

423-
message
423+
body text
424424

425425
see: HEAD~2
426426
$ cat ~/bin/glog-ref
@@ -433,7 +433,7 @@ $ git config trailer.see.cmd "glog-ref"
433433
$ git interpret-trailers --trailer=see <msg.txt
434434
subject
435435

436-
message
436+
body text
437437

438438
See-also: fe3187489d69c4 (subject of related commit)
439439
------------

0 commit comments

Comments
 (0)