git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH resent] send-email: Honor multi-part email messages

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2013, 18:14 UTC
Message-ID
<7va9rx5dvd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<cover.1359126360.git.Alex.Crezoff@gmail.com>
Alexey Shumkin <Alex.Crezoff@gmail.com> writes:
> This function is used to determine "broken" (non-ASCII) headers (to be encode them)
> The problem is if "Subject" is not broken, but message body contains non-ASCII chars,
> subject is marked as broken and encoded again.
I think that is not a "problem" but is a mere symptom.

The remainder of the codeflow of send-email, AFAICS (it's not my code), is not prepared to deal with multipart messages at all. In order to handle multi-part properly, you may still have to fix broken Subject: of the whole thing, and you may also want to fix broken headers inside one part while keeping correctly formatted part intact.

Your patch just stops an early error checking that is meant for a non multi-part message that happens to trigger on a multi-part message in your test case from triggering (i.e. masking a symptom) and let the remaining lines of the multi-part message to codepath that does not do anything special to handle multi-part messages correctly, letting it do whatever it happens to do to a message assuming it is not a multi-part message, no?

In other words, making send-email capable of handling a multi-part might be a worthy thing to do, but I do not think your patch is a good first step for doing so.

Previous: Jeff King
Message 5 of 5 in “send-email: Honor multi-part email messages”
  1. send-email: Honor multi-part email messagesAlexey Shumkin, Jan 25, 2013
  2. send-email: Honor multi-part email messagesAlexey Shumkin, Jan 25, 2013
  3. Krzysztof MazurJan 25, 2013
  4. Jeff KingJan 25, 2013
  5. Junio C HamanoJan 25, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.