aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pretty-formats.txt
diff options
context:
space:
mode:
authorIssac Trotts <issactrotts@google.com>2019-01-10 22:30:46 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-11 10:28:11 -0800
commitad6f028f067673cadadbc2219fcb0bb864300a6c (patch)
treea96a40f373ac72a0a3ea7abe19e32e32b470988f /Documentation/pretty-formats.txt
parentecbdaf0899161c067986e9d9d564586d4b045d62 (diff)
downloadgit-ad6f028f067673cadadbc2219fcb0bb864300a6c.tar.gz
log: add %S option (like --source) to log --format
Make it possible to write for example git log --format="%H,%S" where the %S at the end is a new placeholder that prints out the ref (tag/branch) for each commit. Using %d might seem like an alternative but it only shows the ref for the last commit in the branch. Signed-off-by: Issac Trotts <issactrotts@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-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 417b638cd8..de6953108c 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -134,6 +134,8 @@ The placeholders are:
- '%cI': committer date, strict ISO 8601 format
- '%d': ref names, like the --decorate option of linkgit:git-log[1]
- '%D': ref names without the " (", ")" wrapping.
+- '%S': ref name given on the command line by which the commit was reached
+ (like `git log --source`), only works with `git log`
- '%e': encoding
- '%s': subject
- '%f': sanitized subject line, suitable for a filename