From 6d167fd7ccb84f07a0bd57d8e188a651e913b158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Wed, 1 Mar 2017 12:37:07 +0100 Subject: pretty: use fmt_output_email_subject() Add the email-style subject prefix (e.g. "Subject: [PATCH] ") directly when it's needed instead of letting log_write_email_headers() prepare it in a static buffer in advance. This simplifies storage ownership and code flow. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/shortlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/shortlog.c') diff --git a/builtin/shortlog.c b/builtin/shortlog.c index ba0e1154a9..21402ae8b7 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -143,7 +143,7 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit) ctx.fmt = CMIT_FMT_USERFORMAT; ctx.abbrev = log->abbrev; - ctx.subject = ""; + ctx.print_email_subject = 1; ctx.after_subject = ""; ctx.date_mode.type = DATE_NORMAL; ctx.output_encoding = get_log_output_encoding(); -- cgit v1.2.1