git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/9] docs: interpret-trailers: reword and add examples

From
LGLinus Arver via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 6, 2023, 02:08 UTC
Message-ID
<pull.1506.v3.git.git.1686017304.gitgitgadget@gmail.com>
In-Reply-To
<pull.1506.v2.git.git.1683839975.gitgitgadget@gmail.com>

This series makes some small improvements to the docs for git-interpret-trailers. The intent is to make it easier to read for beginners who have never used this command before.

Changes from v2 to v3 =====================

 * Rebased on top of "master" at fe86abd751 (Git 2.41, 2023-06-01). The only
   conflict was in Patch v2 4/9
   (https://lore.kernel.org/git/783a0b1e00309e9bcf13494908d99317df72f0d6.1683839975.git.gitgitgadget@gmail.com/),
   because cbb83daeaf (doc: interpret-trailers: fix example, 2023-05-01)
   added the "subject/message" style for the examples that did not have any
   message text in them. These examples' additional message lines have been
   replaced with Lorem ipsum... like the others in Patch v2 4/9.

Changes from v1 to v2 =====================

In order of significance:
 * The phrase "commit message part" has been removed.
 * The word "message" is always used as part of the bigger phrase "commit
   message".
 * Deprecation language for trailer.<token>.command has been updated to
   minimize whitespace churn, while also tweaking the 2nd paragraph to
   reduce duplication.
 * The phrase "Lorem ipsum..." is always only used to stand in for the body
   paragraph(s) of a commit message.
 * Grammar fixes have been squashed together (01+06 previously).
Linus Arver (9):
  doc: trailer: fix grammar
  doc: trailer: swap verb order
  doc: trailer: drop "commit message part" phrasing
  doc: trailer: examples: avoid the word "message" by itself
  doc: trailer: remove redundant phrasing
  doc: trailer: use angle brackets for <token> and <value>
  doc: trailer.<token>.command: emphasize deprecation
  doc: trailer: mention 'key' in DESCRIPTION
  doc: trailer: add more examples in DESCRIPTION
 Documentation/git-interpret-trailers.txt | 132 +++++++++++++----------
 1 file changed, 76 insertions(+), 56 deletions(-)
base-commit: fe86abd7511a9a6862d5706c6fa1d9b57a63ba09
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1506%2Flistx%2Fdoc-trailer-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1506/listx/doc-trailer-v3
Pull-Request: https://github.com/git/git/pull/1506
Range-diff vs v2:
  1:  65e6fbdec92 =  1:  7d504700b91 doc: trailer: fix grammar
  2:  82353471831 =  2:  65386432ca4 doc: trailer: swap verb order
  3:  5fabe166714 =  3:  e0a56c8e61d doc: trailer: drop "commit message part" phrasing
  4:  783a0b1e003 !  4:  52f7d29f509 doc: trailer: examples: avoid the word "message" by itself
     @@ Documentation/git-interpret-trailers.txt: EXAMPLES
       
      -message
      +Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     - $ cat msg.txt | git interpret-trailers --trailer 'sign: Alice <alice@example.com>' --trailer 'sign: Bob <bob@example.com>'
     + $ git interpret-trailers --trailer 'sign: Alice <alice@example.com>' --trailer 'sign: Bob <bob@example.com>' <msg.txt
       subject
       
      -message
     @@ Documentation/git-interpret-trailers.txt: EXAMPLES
       
       Signed-off-by: Bob <bob@example.com>
       Acked-by: Alice <alice@example.com>
     -@@ Documentation/git-interpret-trailers.txt: $ git config trailer.help.cmd "~/bin/glog-find-author"
     - $ git interpret-trailers --trailer="help:Junio" --trailer="help:Couder" <<EOF
     - > subject
     - >
     --> message
     -+> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     - >
     - > EOF
     +@@ Documentation/git-interpret-trailers.txt: $ git interpret-trailers --trailer 'Cc: Alice <alice@example.com>' --trailer 'Re
     + $ cat msg1.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + $ git config trailer.sign.key "Signed-off-by: "
     + $ git config trailer.sign.ifmissing add
     + $ git config trailer.sign.ifexists doNothing
     +@@ Documentation/git-interpret-trailers.txt: $ git config trailer.sign.cmd 'echo "$(git config user.name) <$(git config user.
     + $ git interpret-trailers --trailer sign <msg1.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + 
     + Signed-off-by: Bob <bob@example.com>
     + $ cat msg2.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + 
     + Signed-off-by: Alice <alice@example.com>
     + $ git interpret-trailers --trailer sign <msg2.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + 
     + Signed-off-by: Alice <alice@example.com>
     + ------------
     +@@ Documentation/git-interpret-trailers.txt: test -n "$1" && git log --author="$1" --pretty="%an <%ae>" -1 || true
     + $ cat msg.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + $ git config trailer.help.key "Helped-by: "
     + $ git config trailer.help.ifExists "addIfDifferentNeighbor"
     + $ git config trailer.help.cmd "~/bin/glog-find-author"
     + $ git interpret-trailers --trailer="help:Junio" --trailer="help:Couder" <msg.txt
       subject
       
      -message
     @@ Documentation/git-interpret-trailers.txt: $ git config trailer.help.cmd "~/bin/g
       
       Helped-by: Junio C Hamano <gitster@pobox.com>
       Helped-by: Christian Couder <christian.couder@gmail.com>
     -@@ Documentation/git-interpret-trailers.txt: $ git config trailer.ref.cmd "~/bin/glog-grep"
     - $ git interpret-trailers --trailer="ref:Add copyright notices." <<EOF
     - > subject
     - >
     --> message
     -+> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     - >
     - > EOF
     +@@ Documentation/git-interpret-trailers.txt: test -n "$1" && git log --grep "$1" --pretty=reference -1 || true
     + $ cat msg.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + $ git config trailer.ref.key "Reference-to: "
     + $ git config trailer.ref.ifExists "replace"
     + $ git config trailer.ref.cmd "~/bin/glog-grep"
     + $ git interpret-trailers --trailer="ref:Add copyright notices." <msg.txt
       subject
       
      -message
     @@ Documentation/git-interpret-trailers.txt: $ git config trailer.ref.cmd "~/bin/gl
       
       Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
       ------------
     -@@ Documentation/git-interpret-trailers.txt: $ git config trailer.see.command "git log -1 --oneline --format=\"%h (%s)\" --ab
     - $ git interpret-trailers <<EOF
     - > subject
     - > 
     --> message
     -+> Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     - > 
     - > see: HEAD~2
     - > EOF
     +@@ Documentation/git-interpret-trailers.txt: Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
     + $ cat msg.txt
     + subject
     + 
     +-message
     ++Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     + 
     + see: HEAD~2
     + $ cat ~/bin/glog-ref
     +@@ Documentation/git-interpret-trailers.txt: $ git config trailer.see.cmd "glog-ref"
     + $ git interpret-trailers --trailer=see <msg.txt
       subject
       
      -message
  5:  dd7e29fcc21 =  5:  4a2a0e41e4a doc: trailer: remove redundant phrasing
  6:  96cb4ae2965 =  6:  f99545409dc doc: trailer: use angle brackets for <token> and <value>
  7:  4e234110ffd =  7:  6aba774489a doc: trailer.<token>.command: emphasize deprecation
  8:  8aaf9e27d98 =  8:  b13bd73d248 doc: trailer: mention 'key' in DESCRIPTION
  9:  7e95198894b =  9:  ec43e192d6e doc: trailer: add more examples in DESCRIPTION
-- 
gitgitgadget
Previous: Junio C HamanoNext: Linus Arver via GitGitGadget
Message 45 of 73 in “docs: interpret-trailers: reword and add examples”
  1. 00/11 docs: interpret-trailers: reword and add examplesLinus Arver via GitGitGadget, May 8, 2023
  2. 01/11 doc: trailer: fix grammarLinus Arver via GitGitGadget, May 8, 2023
  3. Junio C HamanoMay 8, 2023
  4. Linus ArverMay 8, 2023
  5. Junio C HamanoMay 8, 2023
  6. 02/11 doc: trailer: swap verb orderLinus Arver via GitGitGadget, May 8, 2023
  7. Junio C HamanoMay 8, 2023
  8. 03/11 doc: trailer: --no-divider: more precise languageLinus Arver via GitGitGadget, May 8, 2023
  9. Junio C HamanoMay 8, 2023
  10. 05/11 doc: trailer: remove redundant phrasingLinus Arver via GitGitGadget, May 8, 2023
  11. 04/11 doc: trailer: explain "commit mesage part" on first usageLinus Arver via GitGitGadget, May 8, 2023
  12. Junio C HamanoMay 8, 2023
  13. Linus ArverMay 10, 2023
  14. 07/11 doc: trailer: use angle brackets for <token> and <value>Linus Arver via GitGitGadget, May 8, 2023
  15. Junio C HamanoMay 8, 2023
  16. 06/11 doc: trailer: trailer.<token>.cmd: add missing verb phraseLinus Arver via GitGitGadget, May 8, 2023
  17. Junio C HamanoMay 8, 2023
  18. Linus ArverMay 10, 2023
  19. Junio C HamanoMay 10, 2023
  20. 08/11 doc: trailer.<token>.command: refer to existing exampleLinus Arver via GitGitGadget, May 8, 2023
  21. Junio C HamanoMay 8, 2023
  22. Linus ArverMay 10, 2023
  23. Junio C HamanoMay 10, 2023
  24. 09/11 doc: trailer.<token>.command: emphasize deprecationLinus Arver via GitGitGadget, May 8, 2023
  25. Junio C HamanoMay 8, 2023
  26. Linus ArverMay 10, 2023
  27. 10/11 doc: trailer: mention 'key' in DESCRIPTIONLinus Arver via GitGitGadget, May 8, 2023
  28. 11/11 doc: trailer: add more examples in DESCRIPTIONLinus Arver via GitGitGadget, May 8, 2023
  29. Junio C HamanoMay 8, 2023
  30. Junio C HamanoMay 8, 2023
  31. Linus ArverMay 8, 2023
  32. 0/9 docs: interpret-trailers: reword and add examplesLinus Arver via GitGitGadget, May 11, 2023
  33. 1/9 doc: trailer: fix grammarLinus Arver via GitGitGadget, May 11, 2023
  34. 2/9 doc: trailer: swap verb orderLinus Arver via GitGitGadget, May 11, 2023
  35. 3/9 doc: trailer: drop "commit message part" phrasingLinus Arver via GitGitGadget, May 11, 2023
  36. 5/9 doc: trailer: remove redundant phrasingLinus Arver via GitGitGadget, May 11, 2023
  37. 6/9 doc: trailer: use angle brackets for <token> and <value>Linus Arver via GitGitGadget, May 11, 2023
  38. 4/9 doc: trailer: examples: avoid the word "message" by itselfLinus Arver via GitGitGadget, May 11, 2023
  39. 9/9 doc: trailer: add more examples in DESCRIPTIONLinus Arver via GitGitGadget, May 11, 2023
  40. 7/9 doc: trailer.<token>.command: emphasize deprecationLinus Arver via GitGitGadget, May 11, 2023
  41. 8/9 doc: trailer: mention 'key' in DESCRIPTIONLinus Arver via GitGitGadget, May 11, 2023
  42. Junio C HamanoMay 12, 2023
  43. Linus ArverMay 16, 2023
  44. Junio C HamanoMay 16, 2023
  45. 0/9 docs: interpret-trailers: reword and add examplesLinus Arver via GitGitGadget, Jun 6, 2023
  46. 1/9 doc: trailer: fix grammarLinus Arver via GitGitGadget, Jun 6, 2023
  47. 2/9 doc: trailer: swap verb orderLinus Arver via GitGitGadget, Jun 6, 2023
  48. 3/9 doc: trailer: drop "commit message part" phrasingLinus Arver via GitGitGadget, Jun 6, 2023
  49. Christian CouderJun 14, 2023
  50. Linus ArverJun 15, 2023
  51. 4/9 doc: trailer: examples: avoid the word "message" by itselfLinus Arver via GitGitGadget, Jun 6, 2023
  52. Christian CouderJun 14, 2023
  53. Linus ArverJun 15, 2023
  54. 5/9 doc: trailer: remove redundant phrasingLinus Arver via GitGitGadget, Jun 6, 2023
  55. 6/9 doc: trailer: use angle brackets for <token> and <value>Linus Arver via GitGitGadget, Jun 6, 2023
  56. 7/9 doc: trailer.<token>.command: emphasize deprecationLinus Arver via GitGitGadget, Jun 6, 2023
  57. 8/9 doc: trailer: mention 'key' in DESCRIPTIONLinus Arver via GitGitGadget, Jun 6, 2023
  58. Christian CouderJun 14, 2023
  59. Linus ArverJun 15, 2023
  60. 9/9 doc: trailer: add more examples in DESCRIPTIONLinus Arver via GitGitGadget, Jun 6, 2023
  61. Christian CouderJun 14, 2023
  62. Linus ArverJun 15, 2023
  63. Christian CouderJun 15, 2023
  64. 0/9 docs: interpret-trailers: reword and add examplesLinus Arver via GitGitGadget, Jun 15, 2023
  65. 1/9 doc: trailer: fix grammarLinus Arver via GitGitGadget, Jun 15, 2023
  66. 2/9 doc: trailer: swap verb orderLinus Arver via GitGitGadget, Jun 15, 2023
  67. 3/9 doc: trailer: drop "commit message part" phrasingLinus Arver via GitGitGadget, Jun 15, 2023
  68. 5/9 doc: trailer: remove redundant phrasingLinus Arver via GitGitGadget, Jun 15, 2023
  69. 4/9 doc: trailer: examples: avoid the word "message" by itselfLinus Arver via GitGitGadget, Jun 15, 2023
  70. 6/9 doc: trailer: use angle brackets for <token> and <value>Linus Arver via GitGitGadget, Jun 15, 2023
  71. 7/9 doc: trailer.<token>.command: emphasize deprecationLinus Arver via GitGitGadget, Jun 15, 2023
  72. 8/9 doc: trailer: mention 'key' in DESCRIPTIONLinus Arver via GitGitGadget, Jun 15, 2023
  73. 9/9 doc: trailer: add more examples in DESCRIPTIONLinus Arver via GitGitGadget, Jun 15, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.