# \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- Subsystems: DOCUMENTATION, THE REST
- Maintainers: Jonathan Corbet, Linus Torvalds
- List: git
- 5 messages, 4 authors
- Page: https://ratatoskr.run/git/2017/12/7745880/t

## \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- From: Jeff King \<hidden\>
- Date: 2017-12-08 05:16:43 
- Message: https://ratatoskr.run/git/2017/12/7745880.md

```text
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.

Signed-off-by: Jeff King <redacted>
---
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(-)

diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index d433d50f81..e664c088a5 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -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
-- 
2.15.1.659.g8bd2eae3ea
```

## Re: \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- From: Eric Sunshine \<hidden\>
- Date: 2017-12-08 08:10:40 
- Message: https://ratatoskr.run/git/2017/12/7745882.md

```text
On Fri, Dec 8, 2017 at 12:16 AM, Jeff King [ref] wrote:
> 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/

> released version of Git.
>
> Signed-off-by: Jeff King <redacted>
```

## Re: \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- From: Jeff King \<hidden\>
- Date: 2017-12-08 08:14:29 
- Message: https://ratatoskr.run/git/2017/12/7745883.md

```text
On Fri, Dec 08, 2017 at 03:10:34AM -0500, Eric Sunshine wrote:

> On Fri, Dec 8, 2017 at 12:16 AM, Jeff King [ref] wrote:
> > 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
```

## Re: \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- From: Taylor Blau \<hidden\>
- Date: 2017-12-09 03:44:49 
- Message: https://ratatoskr.run/git/2017/12/7746361.md

```text
On Fri, Dec 08, 2017 at 12:16:36AM -0500, Jeff King wrote:
> 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.
>
> Signed-off-by: Jeff King <redacted>

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

## Re: \[PATCH\] docs/pretty-formats: mention commas in %(trailers) syntax

- From: Jacob Keller \<hidden\>
- Date: 2017-12-09 08:07:16 
- Message: https://ratatoskr.run/git/2017/12/7746363.md

```text
On Thu, Dec 7, 2017 at 9:16 PM, Jeff King [ref] wrote:
> 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.
>
> Signed-off-by: Jeff King <redacted>
> ---
> 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(-)
>
> diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
> index d433d50f81..e664c088a5 100644
> --- a/Documentation/pretty-formats.txt
> +++ b/Documentation/pretty-formats.txt
> @@ -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
> --
> 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
```
