@@ -83,12 +83,12 @@ OPTIONS
83
83
84
84
--trim-empty::
85
85
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 .
87
87
This applies to existing trailers as well as new trailers.
88
88
89
89
--trailer <token>[(=|:)<value>]::
90
90
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
92
92
command.
93
93
94
94
--where <placement>::
@@ -102,7 +102,7 @@ OPTIONS
102
102
--if-exists <action>::
103
103
--no-if-exists::
104
104
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
106
106
provided with '--if-exists' overrides all configuration variables
107
107
and applies to all '--trailer' options until the next occurrence of
108
108
'--if-exists' or '--no-if-exists'. Possible actions are `addIfDifferent`,
@@ -111,7 +111,7 @@ OPTIONS
111
111
--if-missing <action>::
112
112
--no-if-missing::
113
113
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
115
115
provided with '--if-missing' overrides all configuration variables
116
116
and applies to all '--trailer' options until the next occurrence of
117
117
'--if-missing' or '--no-if-missing'. Possible actions are `doNothing`
@@ -178,7 +178,7 @@ first trailer with the same <token>.
178
178
trailer.ifexists::
179
179
This option makes it possible to choose what action will be
180
180
performed when there is already at least one trailer with the
181
- same <token> in the message .
181
+ same <token> in the input .
182
182
+
183
183
The valid values for this option are: `addIfDifferentNeighbor` (this
184
184
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
188
188
where the new trailer will be added.
189
189
+
190
190
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 .
192
192
+
193
193
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 .
195
195
+
196
196
With `replace`, an existing trailer with the same <token> will be
197
197
deleted and the new trailer will be added. The deleted trailer will be
198
198
the closest one (with the same <token>) to the place where the new one
199
199
will be added.
200
200
+
201
201
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 .
203
203
204
204
trailer.ifmissing::
205
205
This option makes it possible to choose what action will be
206
206
performed when there is not yet any trailer with the same
207
- <token> in the message .
207
+ <token> in the input .
208
208
+
209
209
The valid values for this option are: `add` (this is the default) and
210
210
`doNothing`.
@@ -276,37 +276,37 @@ EXAMPLES
276
276
--------
277
277
278
278
* 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 :
280
280
+
281
281
------------
282
282
$ git config trailer.sign.key "Signed-off-by"
283
283
$ cat msg.txt
284
284
subject
285
285
286
- message
286
+ body text
287
287
$ git interpret-trailers --trailer 'sign: Alice <
[email protected] >' --trailer 'sign: Bob <
[email protected] >' <msg.txt
288
288
subject
289
289
290
- message
290
+ body text
291
291
292
292
Signed-off-by: Alice <
[email protected] >
293
293
Signed-off-by: Bob <
[email protected] >
294
294
------------
295
295
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:
297
297
+
298
298
------------
299
299
$ cat msg.txt
300
300
subject
301
301
302
- message
302
+ body text
303
303
304
304
Signed-off-by: Bob <
[email protected] >
305
305
$ git interpret-trailers --trailer 'Acked-by: Alice <
[email protected] >' --in-place msg.txt
306
306
$ cat msg.txt
307
307
subject
308
308
309
- message
309
+ body text
310
310
311
311
Signed-off-by: Bob <
[email protected] >
312
312
Acked-by: Alice <
[email protected] >
@@ -329,27 +329,27 @@ $ git interpret-trailers --trailer 'Cc: Alice <
[email protected] >' --trailer 'Re
329
329
$ cat msg1.txt
330
330
subject
331
331
332
- message
332
+ body text
333
333
$ git config trailer.sign.key "Signed-off-by: "
334
334
$ git config trailer.sign.ifmissing add
335
335
$ git config trailer.sign.ifexists doNothing
336
336
$ git config trailer.sign.cmd 'echo "$(git config user.name) <$(git config user.email)>"'
337
337
$ git interpret-trailers --trailer sign <msg1.txt
338
338
subject
339
339
340
- message
340
+ body text
341
341
342
342
Signed-off-by: Bob <
[email protected] >
343
343
$ cat msg2.txt
344
344
subject
345
345
346
- message
346
+ body text
347
347
348
348
Signed-off-by: Alice <
[email protected] >
349
349
$ git interpret-trailers --trailer sign <msg2.txt
350
350
subject
351
351
352
- message
352
+ body text
353
353
354
354
Signed-off-by: Alice <
[email protected] >
355
355
------------
@@ -377,14 +377,14 @@ test -n "$1" && git log --author="$1" --pretty="%an <%ae>" -1 || true
377
377
$ cat msg.txt
378
378
subject
379
379
380
- message
380
+ body text
381
381
$ git config trailer.help.key "Helped-by: "
382
382
$ git config trailer.help.ifExists "addIfDifferentNeighbor"
383
383
$ git config trailer.help.cmd "~/bin/glog-find-author"
384
384
$ git interpret-trailers --trailer="help:Junio" --trailer="help:Couder" <msg.txt
385
385
subject
386
386
387
- message
387
+ body text
388
388
389
389
Helped-by: Junio C Hamano <
[email protected] >
390
390
Helped-by: Christian Couder <
[email protected] >
@@ -401,14 +401,14 @@ test -n "$1" && git log --grep "$1" --pretty=reference -1 || true
401
401
$ cat msg.txt
402
402
subject
403
403
404
- message
404
+ body text
405
405
$ git config trailer.ref.key "Reference-to: "
406
406
$ git config trailer.ref.ifExists "replace"
407
407
$ git config trailer.ref.cmd "~/bin/glog-grep"
408
408
$ git interpret-trailers --trailer="ref:Add copyright notices." <msg.txt
409
409
subject
410
410
411
- message
411
+ body text
412
412
413
413
Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
414
414
------------
@@ -420,7 +420,7 @@ Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
420
420
$ cat msg.txt
421
421
subject
422
422
423
- message
423
+ body text
424
424
425
425
see: HEAD~2
426
426
$ cat ~/bin/glog-ref
@@ -433,7 +433,7 @@ $ git config trailer.see.cmd "glog-ref"
433
433
$ git interpret-trailers --trailer=see <msg.txt
434
434
subject
435
435
436
- message
436
+ body text
437
437
438
438
See-also: fe3187489d69c4 (subject of related commit)
439
439
------------
0 commit comments