summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2016-11-19 00:58:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-11 21:58:41 (GMT)
commitd9f31fbfe98e0e363a3c69aaf6badecc746afe6b (patch)
treee8aeacdbd2aae73e2ffc4f9497c19e321e1548e3 /Documentation
parent967dfd4d568c2b102281de8cc22ee35f7558358b (diff)
downloadgit-d9f31fbfe98e0e363a3c69aaf6badecc746afe6b.zip
git-d9f31fbfe98e0e363a3c69aaf6badecc746afe6b.tar.gz
git-d9f31fbfe98e0e363a3c69aaf6badecc746afe6b.tar.bz2
pretty: add %(trailers) format for displaying trailers of a commit message
Recent patches have expanded on the trailers.c code and we have the builtin commant git-interpret-trailers which can be used to add or modify trailer lines. However, there is no easy way to simply display the trailers of a commit message. Add support for %(trailers) format modifier which will use the trailer_info_get() calls to read trailers in an identical way as git interpret-trailers does. Use a long format option instead of a short name so that future work can more easily unify ref-filter and pretty formats. Add documentation and tests for the same. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/pretty-formats.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 3bcee2d..47b286b 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -199,6 +199,8 @@ 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]
NOTE: Some placeholders may depend on other options given to the
revision traversal engine. For example, the `%g*` reflog options will