summaryrefslogtreecommitdiff
path: root/Documentation/pretty-formats.txt
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2019-01-28 21:33:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 18:03:32 (GMT)
commit250bea0c1652ad546cd0455852bd734e4820ec46 (patch)
tree63046899319a3db38cb320d7faddf6d3cc91e63e /Documentation/pretty-formats.txt
parent3e3f34781964c225ca199ac50527f3ce6feddb84 (diff)
downloadgit-250bea0c1652ad546cd0455852bd734e4820ec46.zip
git-250bea0c1652ad546cd0455852bd734e4820ec46.tar.gz
git-250bea0c1652ad546cd0455852bd734e4820ec46.tar.bz2
pretty: allow showing specific trailers
Adds a new "key=X" option to "%(trailers)" which will cause it to only print trailer lines which match any of the specified keys. 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.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index dcb686e..abfb249 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -225,6 +225,14 @@ 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:
+** 'key=<K>': only show trailers with specified key. Matching is done
+ case-insensitively and trailing colon is optional. If option is
+ given multiple times trailer lines matching any of the keys are
+ shown. This option automatically enables the `only` option so that
+ non-trailer lines in the trailer block are hidden. If that is not
+ desired it can be disabled with `only=false`. E.g.,
+ `%(trailers:key=Reviewed-by)` shows trailer lines with key
+ `Reviewed-by`.
** '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