diff options
author | Anders Waldenborg <anders@0x63.nu> | 2019-01-28 22:33:34 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 10:03:32 -0800 |
commit | 250bea0c1652ad546cd0455852bd734e4820ec46 (patch) | |
tree | 63046899319a3db38cb320d7faddf6d3cc91e63e /Documentation | |
parent | pretty: single return path in %(trailers) handling (diff) | |
download | tgif-250bea0c1652ad546cd0455852bd734e4820ec46.tar.xz |
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')
-rw-r--r-- | Documentation/pretty-formats.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index dcb686e88f..abfb249339 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 |