aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/log.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-11-09 11:19:56 +0000
committerJunio C Hamano <gitster@pobox.com>2023-11-10 11:04:11 +0900
commit219d54ae8c96bcb84d0216797af7572fff7199b8 (patch)
tree2b320c85c36f3b63c917dda7254fe701f1823e1a /builtin/log.c
parentGit 2.43-rc1 (diff)
downloadgit-219d54ae8c96bcb84d0216797af7572fff7199b8.tar.gz
git-219d54ae8c96bcb84d0216797af7572fff7199b8.zip
format-patch: fix ignored encode_email_headers for cover letter
When writing the cover letter, the encode_email_headers option was ignored. That is, UTF-8 subject lines and email addresses were written out as-is, without any Q-encoding, even if --encode-email-headers was passed on the command line. This is due to encode_email_headers not being copied over from struct rev_info to struct pretty_print_context. Fix that and add a test. Signed-off-by: Simon Ser <contact@emersion.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index ba775d7b5c..87fd1c8560 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1364,6 +1364,7 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
pp.date_mode.type = DATE_RFC2822;
pp.rev = rev;
pp.print_email_subject = 1;
+ pp.encode_email_headers = rev->encode_email_headers;
pp_user_info(&pp, NULL, &sb, committer, encoding);
prepare_cover_text(&pp, description_file, branch_name, &sb,
encoding, need_8bit_cte);