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

Re: [PATCH] Added --export option to git-send-email.

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 13, 2008, 21:44 UTC
Message-ID
<32541b130807131444s5e9ea0d6v9610dd5871467fc9@mail.gmail.com>
In-Reply-To
<7vbq11qxfb.fsf@gitster.siamese.dyndns.org>
On 7/13/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>  >> Sorry, but I am scratching my head here.  Shouldn't this "bare From
>  >>  munging" be like this instead?
>  >>
>  >>                 $message =~ s/^From />From /m;
>  >
>  > That wouldn't be a reversible operation.
>
> So what?  Adding Cc: and stuff send-email does are already irreversible
>  anyway.

At one point the people who write mailers realized that just munging "From" to ">From" when putting things into an mbox was irreversible, ie, there was no way to later display the contents of the mbox without showing ">From" where "From" was intended.

However, if you always insert _another_ ">" whenever "^>*From" is detected, then you can also always do the opposite upon displaying to the user, and the message is effectively not munged. It becomes simply a part of the mbox file encoding.

So by encoding it this way, someone with a modern mailer could view the resulting mbox with all the munged text de-mungled. Someone without a modern mailer would see munging anyhow, so they're no worse off.

Have fun,
Avery
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 15 in “Added --export option to git-send-email.”
  1. Added --export option to git-send-email.Eduard - Gabriel Munteanu, Jul 10, 2008
  2. Junio C HamanoJul 11, 2008
  3. Eduard - Gabriel MunteanuJul 11, 2008
  4. Junio C HamanoJul 13, 2008
  5. Avery PennarunJul 13, 2008
  6. Junio C HamanoJul 13, 2008
  7. Avery PennarunJul 13, 2008
  8. Junio C HamanoJul 13, 2008
  9. Avery PennarunJul 13, 2008
  10. Junio C HamanoJul 13, 2008
  11. Avery PennarunJul 13, 2008
  12. Eduard - Gabriel MunteanuJul 13, 2008
  13. Junio C HamanoJul 14, 2008
  14. Avery PennarunJul 14, 2008
  15. Eduard - Gabriel MunteanuJul 14, 2008

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.