From 9271095cc5571e306d709ebf8eb7f0a388254d9d Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Thu, 18 Sep 2014 21:53:53 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- pretty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 3a1da6fd32..811291c898 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 */ -- cgit v1.2.3