]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / pretty.c
index 28afc701b6a46d1aca84d7867549391d79a6ab68..2a3d46bf42fea1d375eb1b29e52ee1caaa0372a0 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -474,7 +474,8 @@ void pp_user_info(struct pretty_print_context *pp,
                }
 
                strbuf_addstr(sb, "From: ");
-               if (needs_rfc2047_encoding(namebuf, namelen)) {
+               if (pp->encode_email_headers &&
+                   needs_rfc2047_encoding(namebuf, namelen)) {
                        add_rfc2047(sb, namebuf, namelen,
                                    encoding, RFC2047_ADDRESS);
                        max_length = 76; /* per rfc2047 */
@@ -1767,7 +1768,8 @@ void pp_title_line(struct pretty_print_context *pp,
        if (pp->print_email_subject) {
                if (pp->rev)
                        fmt_output_email_subject(sb, pp->rev);
-               if (needs_rfc2047_encoding(title.buf, title.len))
+               if (pp->encode_email_headers &&
+                   needs_rfc2047_encoding(title.buf, title.len))
                        add_rfc2047(sb, title.buf, title.len,
                                                encoding, RFC2047_SUBJECT);
                else