summaryrefslogtreecommitdiff
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-03-01 11:37:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-01 23:09:17 (GMT)
commit6d167fd7ccb84f07a0bd57d8e188a651e913b158 (patch)
tree73b2ac5bf9dd492b1b8112ababde2c2e16caac84 /builtin/shortlog.c
parent8ffc8dc6bab4cf3d2364dd54b2de6c3afdb48610 (diff)
downloadgit-6d167fd7ccb84f07a0bd57d8e188a651e913b158.zip
git-6d167fd7ccb84f07a0bd57d8e188a651e913b158.tar.gz
git-6d167fd7ccb84f07a0bd57d8e188a651e913b158.tar.bz2
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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index ba0e115..21402ae 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();