summaryrefslogtreecommitdiff
path: root/pretty.h
diff options
context:
space:
mode:
authorIssac Trotts <issactrotts@google.com>2019-01-11 06:30:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-11 18:28:11 (GMT)
commitad6f028f067673cadadbc2219fcb0bb864300a6c (patch)
treea96a40f373ac72a0a3ea7abe19e32e32b470988f /pretty.h
parentecbdaf0899161c067986e9d9d564586d4b045d62 (diff)
downloadgit-ad6f028f067673cadadbc2219fcb0bb864300a6c.zip
git-ad6f028f067673cadadbc2219fcb0bb864300a6c.tar.gz
git-ad6f028f067673cadadbc2219fcb0bb864300a6c.tar.bz2
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 'pretty.h')
-rw-r--r--pretty.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pretty.h b/pretty.h
index 7359d31..87ca5df 100644
--- a/pretty.h
+++ b/pretty.h
@@ -60,6 +60,7 @@ static inline int cmit_fmt_is_mail(enum cmit_fmt fmt)
struct userformat_want {
unsigned notes:1;
+ unsigned source:1;
};
/* Set the flag "w->notes" if there is placeholder %N in "fmt". */