Skip to contentSkip to conversation

docs/pretty-formats: mention commas in %(trailers) syntax

PATCH In review Jeff King 5 participants 7 messages Dec 8, 2017 – Dec 9, 2017 Documentation

lore
Share & tools
lore

Jeff King

author
#0 lore raw

PATCH 1/1 docs/pretty-formats: mention commas in %(trailers) syntax

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a released version of Git.

---
This should go on top of tb/delimit-pretty-trailers-args-with-comma.

 Documentation/pretty-formats.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Documentation/pretty-formats.txt +7 -5
index d433d50f81..e664c088a5 100644
@@ -204,11 +204,13 @@ endif::git-rev-list[]
   than given and there are spaces on its left, use those spaces
 - '%><(<N>)', '%><|(<N>)': similar to '% <(<N>)', '%<|(<N>)'
   respectively, but padding both sides (i.e. the text is centered)
-- %(trailers): display the trailers of the body as interpreted by
-  linkgit:git-interpret-trailers[1]. If the `:only` option is given,
-  omit non-trailer lines from the trailer block.  If the `:unfold`
-  option is given, behave as if interpret-trailer's `--unfold` option
-  was given. E.g., `%(trailers:only:unfold)` to do both.
+- %(trailers[:options]): display the trailers of the body as interpreted
+  by linkgit:git-interpret-trailers[1]. The `trailers` string may be
+  followed by a colon and zero or more comma-separated options. If the
+  `only` option is given, omit non-trailer lines from the trailer block.
+  If the `unfold` option is given, behave as if interpret-trailer's
+  `--unfold` option was given.  E.g., `%(trailers:only,unfold)` to do
+  both.
 
 NOTE: Some placeholders may depend on other options given to the
 revision traversal engine. For example, the `%g*` reflog options will
Signature · 1 line
2.15.1.659.g8bd2eae3ea
#1 lore raw
Quoted 6 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a

I suppose you mean: s/need/no need/

Quoted 3 lines

released version of Git.

author
#2 lore raw
Quoted 9 lines · Eric Sunshine
Quoted 6 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a

I suppose you mean: s/need/no need/

Yes, indeed. Thanks.

-Peff

#4 lore raw
In reply to Jeff King
Quoted 7 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a released version of Git.

There's or There's no?

Quoted 31 lines

---
This should go on top of tb/delimit-pretty-trailers-args-with-comma.

 Documentation/pretty-formats.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Documentation/pretty-formats.txt +7 -5
index d433d50f81..e664c088a5 100644
@@ -204,11 +204,13 @@ endif::git-rev-list[]
   than given and there are spaces on its left, use those spaces
 - '%><(<N>)', '%><|(<N>)': similar to '% <(<N>)', '%<|(<N>)'
   respectively, but padding both sides (i.e. the text is centered)
-- %(trailers): display the trailers of the body as interpreted by
-  linkgit:git-interpret-trailers[1]. If the `:only` option is given,
-  omit non-trailer lines from the trailer block.  If the `:unfold`
-  option is given, behave as if interpret-trailer's `--unfold` option
-  was given. E.g., `%(trailers:only:unfold)` to do both.
+- %(trailers[:options]): display the trailers of the body as interpreted
+  by linkgit:git-interpret-trailers[1]. The `trailers` string may be
+  followed by a colon and zero or more comma-separated options. If the
+  `only` option is given, omit non-trailer lines from the trailer block.
+  If the `unfold` option is given, behave as if interpret-trailer's
+  `--unfold` option was given.  E.g., `%(trailers:only,unfold)` to do
+  both.
 
 NOTE: Some placeholders may depend on other options given to the
 revision traversal engine. For example, the `%g*` reflog options will
#3 lore raw
In reply to Jeff King
Quoted 8 lines · Jeff King
Quoted 6 lines · Eric Sunshine
Quoted 5 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

There's need to mention the old syntax; it was never in a

I suppose you mean: s/need/no need/

Yes, indeed. Thanks.

Ah, I probably should switch to 'read-only' mode until I finish my inbox.

#5 lore raw
In reply to Jeff King
Quoted 9 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a released version of Git.

My mistake, and thank you for giving this your attention.

#6 lore raw
In reply to Jeff King
Quoted 39 lines · Jeff King

Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments with ",", 2017-10-01) switched the syntax of the trailers placeholder, but forgot to update the documentation in pretty-formats.txt.

There's need to mention the old syntax; it was never in a released version of Git.

---
This should go on top of tb/delimit-pretty-trailers-args-with-comma.

 Documentation/pretty-formats.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Documentation/pretty-formats.txt +7 -6
index d433d50f81..e664c088a5 100644
@@ -204,11 +204,13 @@ endif::git-rev-list[]
   than given and there are spaces on its left, use those spaces
 - '%><(<N>)', '%><|(<N>)': similar to '% <(<N>)', '%<|(<N>)'
   respectively, but padding both sides (i.e. the text is centered)
-- %(trailers): display the trailers of the body as interpreted by
-  linkgit:git-interpret-trailers[1]. If the `:only` option is given,
-  omit non-trailer lines from the trailer block.  If the `:unfold`
-  option is given, behave as if interpret-trailer's `--unfold` option
-  was given. E.g., `%(trailers:only:unfold)` to do both.
+- %(trailers[:options]): display the trailers of the body as interpreted
+  by linkgit:git-interpret-trailers[1]. The `trailers` string may be
+  followed by a colon and zero or more comma-separated options. If the
+  `only` option is given, omit non-trailer lines from the trailer block.
+  If the `unfold` option is given, behave as if interpret-trailer's
+  `--unfold` option was given.  E.g., `%(trailers:only,unfold)` to do
+  both.
 
 NOTE: Some placeholders may depend on other options given to the
 revision traversal engine. For example, the `%g*` reflog options will
--
Quoted 1 line

2.15.1.659.g8bd2eae3ea

HAH. I was recently looking at this documentation and going to send a patch. Looks good besides the other reviewers comments.

Thanks,
Jake