Skip to content

Don't Q-quote the in-body From: line #2420

Backlog

Description

@taahol

@gitster wrote in <xmqqmrqz5pj8.fsf@gitster.g>:

> From: =?UTF-8?q?Kasper=20Lind=20S=C3=B8rensen?= <kasper@portchain.com>

It is somewhat unusual to see the in-body From: line Q-quoted like this,
and it is especially curious given that your sign-off is not.  I wonder
if we need to tweak the GitGitGadget tool?  It has been in use for quite
a long time and I am sure you are not the first person with name outside
US-ASCII to use it to send patches to this list.  Puzzled...

Should we add something like rfc2047.decode() in

mails[i] = header + "\n\nFrom: " + authorMatch[2] + match[2];
?

Activity

  1. webstech commented on Nov 27, 2026

    @webstech
    Contributor

    The raw email shows the problem is a discrepancy between the Content-Transfer-Encoding and the use of the quoted-printable encoding in the body. Rather than setting the Content-Transfer-Encoding to quoted-printable, it would be better to just not use the encoded name in the From: pseudo header. Also, since the email headers appear to be automatically encoded, there may be no need to encode the name at all.

    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    ...
    Cc: Toon Claes <toon@iotcl.com>,
        Junio C Hamano <gitster@pobox.com>,
        =?UTF-8?Q?Jean-No=C3=ABl?= Avila <jn.avila@free.fr>,
        Kasper Lind =?UTF-8?Q?S=C3=B8rensen?= <kasper@portchain.com>,
        =?UTF-8?q?Kasper=20Lind=20S=C3=B8rensen?= <kasper@portchain.com>
    
    From: =?UTF-8?q?Kasper=20Lind=20S=C3=B8rensen?= <kasper@portchain.com>
    

    Side note, there is probably no need to have the author cc'ed twice.

  2. taahol commented on Nov 28, 2026

    @taahol
    Author

    Also, since the email headers appear to be automatically encoded, there may be no need to encode the name at all.

    In other words, let's add "--no-encode-email-headers" to

    const args = [
    "format-patch",
    "--thread",
    "--stdout",
    `--signature=${this.config.repo.owner}`,
    "--add-header=Fcc: Sent",
    "--base",
    mergeBase,
    this.project.to,
    ].concat(PatchSeries.generateSingletonHeaders());
    ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions