diff options
author | Anders Waldenborg <anders@0x63.nu> | 2019-01-28 21:33:35 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 18:03:32 (GMT) |
commit | d9b936db5226ed4b87d42a2c91324adc50c768b6 (patch) | |
tree | 8f8c8c7460c3278063e62ec98cc44be4e5c0c6ea /Documentation/pretty-formats.txt | |
parent | 250bea0c1652ad546cd0455852bd734e4820ec46 (diff) | |
download | git-d9b936db5226ed4b87d42a2c91324adc50c768b6.zip git-d9b936db5226ed4b87d42a2c91324adc50c768b6.tar.gz git-d9b936db5226ed4b87d42a2c91324adc50c768b6.tar.bz2 |
pretty: add support for "valueonly" option in %(trailers)
With the new "key=" option to %(trailers) it often makes little sense to
show the key, as it by definition already is knows which trailer is
printed there. This new "valueonly" option makes it omit the key when
printing trailers.
E.g.:
$ git show -s --pretty='%s%n%(trailers:key=Signed-off-by,valueonly)' aaaa88182
will show:
> upload-pack: fix broken if/else chain in config callback
> Jeff King <peff@peff.net>
> Junio C Hamano <gitster@pobox.com>
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index abfb249..76e2dbd 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -243,6 +243,8 @@ endif::git-rev-list[] 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. +** 'valueonly[=val]': skip over the key part of the trailer line and only + show the value part. Also this optionally allows explicit value. NOTE: Some placeholders may depend on other options given to the revision traversal engine. For example, the `%g*` reflog options will |