summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2014-09-18 20:53:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-18 22:15:21 (GMT)
commit9271095cc5571e306d709ebf8eb7f0a388254d9d (patch)
tree82f6c8af5766632711b0daa9012f4af903c1b3bb /pretty.c
parent96db324a73fdada6fbe7b63221986f8f18cc63b0 (diff)
downloadgit-9271095cc5571e306d709ebf8eb7f0a388254d9d.zip
git-9271095cc5571e306d709ebf8eb7f0a388254d9d.tar.gz
git-9271095cc5571e306d709ebf8eb7f0a388254d9d.tar.bz2
pretty: add %D format specifier
Add a new format specifier, '%D' that is identical in behaviour to '%d', except that it does not include the ' (' prefix or ')' suffix provided by '%d'. Signed-off-by: Harry Jeffery <harry@exec64.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pretty.c b/pretty.c
index 3a1da6f..811291c 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1190,6 +1190,10 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
load_ref_decorations(DECORATE_SHORT_REFS);
format_decorations(sb, commit, c->auto_color);
return 1;
+ case 'D':
+ load_ref_decorations(DECORATE_SHORT_REFS);
+ format_decorations_extended(sb, commit, c->auto_color, "", ", ", "");
+ return 1;
case 'g': /* reflog info */
switch(placeholder[1]) {
case 'd': /* reflog selector */