summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:21 (GMT)
commit4e0086bea1dd58193b05ff4b5b0ac8819334e359 (patch)
tree4741e2418cf678a61ddec6c37c6163cabf8607ed /log-tree.c
parent71cdbb3d4a07811ac29d2097e942607fbe1ddf33 (diff)
parent50cd54ef4e6f4279683b61417a35de7297b55b9d (diff)
downloadgit-4e0086bea1dd58193b05ff4b5b0ac8819334e359.zip
git-4e0086bea1dd58193b05ff4b5b0ac8819334e359.tar.gz
git-4e0086bea1dd58193b05ff4b5b0ac8819334e359.tar.bz2
Merge branch 'bc/format-patch-cover-no-attach'
"git format-patch --cover --attach" created a broken MIME multipart message for the cover letter, which has been fixed by keeping the cover letter as plain text file. * bc/format-patch-cover-no-attach: format-patch: make cover letters always text/plain
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/log-tree.c b/log-tree.c
index 66329d0..724bae0 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -362,7 +362,8 @@ void fmt_output_email_subject(struct strbuf *sb, struct rev_info *opt)
void log_write_email_headers(struct rev_info *opt, struct commit *commit,
const char **extra_headers_p,
- int *need_8bit_cte_p)
+ int *need_8bit_cte_p,
+ int maybe_multipart)
{
const char *extra_headers = opt->extra_headers;
const char *name = oid_to_hex(opt->zero_commit ?
@@ -385,7 +386,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,
opt->ref_message_ids->items[i].string);
graph_show_oneline(opt->graph);
}
- if (opt->mime_boundary) {
+ if (opt->mime_boundary && maybe_multipart) {
static char subject_buffer[1024];
static char buffer[1024];
struct strbuf filename = STRBUF_INIT;
@@ -611,7 +612,7 @@ void show_log(struct rev_info *opt)
if (cmit_fmt_is_mail(opt->commit_format)) {
log_write_email_headers(opt, commit, &extra_headers,
- &ctx.need_8bit_cte);
+ &ctx.need_8bit_cte, 1);
ctx.rev = opt;
ctx.print_email_subject = 1;
} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {