]> git.ipfire.org Git - thirdparty/git.git/commit - pretty.c
log: add %S option (like --source) to log --format
authorIssac Trotts <issactrotts@google.com>
Fri, 11 Jan 2019 06:30:46 +0000 (22:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Jan 2019 18:28:11 +0000 (10:28 -0800)
commitad6f028f067673cadadbc2219fcb0bb864300a6c
treea96a40f373ac72a0a3ea7abe19e32e32b470988f
parentecbdaf0899161c067986e9d9d564586d4b045d62
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>
Documentation/pretty-formats.txt
builtin/log.c
log-tree.c
pretty.c
pretty.h
t/t4205-log-pretty-formats.sh
t/t6006-rev-list-format.sh