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 <alice@example.com> Signed-off-by: Alice <alice@example.com> 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 <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kristoffer Haugsbakk committed May 1, 2023 at 22:02 UTC cbb83daeafa27ba8880516deb943900e46cb047f
1 file changed +17 -3
Documentation/git-interpret-trailers.txt
+17 -3
@@ -322,16 +322,30 @@ $ git interpret-trailers --trailer 'Cc: Alice <alice@example.com>' --trailer 'Re
322 'Signed-off-by: ' already, and show how it works:
323 +
324 ------------
325 +$ cat msg1.txt
326 +subject
327 +
328 +message
329 $ git config trailer.sign.key "Signed-off-by: "
330 $ git config trailer.sign.ifmissing add
331 $ git config trailer.sign.ifexists doNothing
332 $ 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
337
338 Signed-off-by: Bob <bob@example.com>
332 -$ cat msg.txt
339 +$ cat msg2.txt
340 +subject
341 +
342 +message
343 +
344 Signed-off-by: Alice <alice@example.com>
334 -$ git interpret-trailers <msg.txt
345 +$ git interpret-trailers --trailer sign <msg2.txt
346 +subject
347 +
348 +message
349
350 Signed-off-by: Alice <alice@example.com>
351 ------------