Skip to content

Commit cbb83da

Browse files
LemmingAvalanchegitster
authored andcommitted
doc: interpret-trailers: fix example
We need to provide `--trailer sign` since the command won’t output anything if you don’t give it an input and/or a `--trailer`. Furthermore, the message which already contains an s-o-b is wrong: $ git interpret-trailers --trailer sign <msg.txt Signed-off-by: Alice <[email protected]> Signed-off-by: Alice <[email protected]> This can’t be what was originally intended. So change the messages in this example to use the typical “subject/message” file. Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f68c268 commit cbb83da

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Documentation/git-interpret-trailers.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,16 +322,30 @@ $ git interpret-trailers --trailer 'Cc: Alice <[email protected]>' --trailer 'Re
322322
'Signed-off-by: ' already, and show how it works:
323323
+
324324
------------
325+
$ cat msg1.txt
326+
subject
327+
328+
message
325329
$ git config trailer.sign.key "Signed-off-by: "
326330
$ git config trailer.sign.ifmissing add
327331
$ git config trailer.sign.ifexists doNothing
328332
$ git config trailer.sign.cmd 'echo "$(git config user.name) <$(git config user.email)>"'
329-
$ git interpret-trailers </dev/null
333+
$ git interpret-trailers --trailer sign <msg1.txt
334+
subject
335+
336+
message
330337

331338
Signed-off-by: Bob <[email protected]>
332-
$ cat msg.txt
339+
$ cat msg2.txt
340+
subject
341+
342+
message
343+
333344
Signed-off-by: Alice <[email protected]>
334-
$ git interpret-trailers <msg.txt
345+
$ git interpret-trailers --trailer sign <msg2.txt
346+
subject
347+
348+
message
335349

336350
Signed-off-by: Alice <[email protected]>
337351
------------

0 commit comments

Comments
 (0)