diff options
author | René Scharfe <l.s.r@web.de> | 2017-03-01 12:37:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-01 15:09:17 -0800 |
commit | 6d167fd7ccb84f07a0bd57d8e188a651e913b158 (patch) | |
tree | 73b2ac5bf9dd492b1b8112ababde2c2e16caac84 /builtin/shortlog.c | |
parent | log-tree: factor out fmt_output_email_subject() (diff) | |
download | tgif-6d167fd7ccb84f07a0bd57d8e188a651e913b158.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |