threads / patch / 45417

patchshortlog: don't set after_subject to an empty string

Subject: [PATCH] shortlog: don't set after_subject to an empty string

## tl;dr

One message between Mar 17, 2017 and Mar 17, 2017. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

René Scharfe· Mar 17, 2017, 23:52 UTC · lore

The string after_subject is added to a strbuf by pp_title_line() if it's not NULL. Adding an empty string has the same effect as not adding anything, but the latter is easier, so don't bother changing the context member from NULL to "".

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/shortlog.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to builtin/shortlog.c +0 −1
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index f78bb4818d..7cff1839fc 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -149,7 +149,6 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
 	ctx.fmt = CMIT_FMT_USERFORMAT;
 	ctx.abbrev = log->abbrev;
 	ctx.print_email_subject = 1;
-	ctx.after_subject = "";
 	ctx.date_mode.type = DATE_NORMAL;
 	ctx.output_encoding = get_log_output_encoding();
 
-- 
2.12.0

← back to recent threads