diff options
author | Anders Waldenborg <anders@0x63.nu> | 2019-01-29 07:49:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 10:03:09 -0800 |
commit | 4f732e0fd7a524759424c817b92848949db1e2db (patch) | |
tree | 18d55a44356ebf85b030b74874c5ea406130a00c /Documentation/pretty-formats.txt | |
parent | 42617752d4b22d616e276528ba4d155e6fff1835 (diff) | |
download | git-4f732e0fd7a524759424c817b92848949db1e2db.tar.gz |
pretty: allow %(trailers) options with explicit value
In addition to old %(trailers:only) it is now allowed to write
%(trailers:only=yes)
By itself this only gives (the not quite so useful) possibility to have
users change their mind in the middle of a formatting
string (%(trailers:only=true,only=false)). However, it gives users the
opportunity to override defaults from future options.
Signed-off-by: Anders Waldenborg <anders@0x63.nu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r-- | Documentation/pretty-formats.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 8740b43581..dcb686e88f 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -225,10 +225,16 @@ endif::git-rev-list[] linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by a colon and zero or more comma-separated options: -** 'only': omit non-trailer lines from the trailer block. -** 'unfold': make it behave as if interpret-trailer's `--unfold` - option was given. E.g., `%(trailers:only,unfold)` unfolds and - shows all trailer lines. +** 'only[=val]': select whether non-trailer lines from the trailer + block should be included. The `only` keyword may optionally be + followed by an equal sign and one of `true`, `on`, `yes` to omit or + `false`, `off`, `no` to show the non-trailer lines. If option is + given without value it is enabled. If given multiple times the last + value is used. +** 'unfold[=val]': make it behave as if interpret-trailer's `--unfold` + option was given. In same way as to for `only` it can be followed + by an equal sign and explicit value. E.g., + `%(trailers:only,unfold=true)` unfolds and shows all trailer lines. NOTE: Some placeholders may depend on other options given to the revision traversal engine. For example, the `%g*` reflog options will |