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

[PATCH] Re: git-am: less strong format "mbox" detection

From
NSNicolas Sebrecht <nicolas.s.dev@gmx.fr>
Date
Jul 14, 2009, 12:23 UTC
Message-ID
<20090714122354.GA13806@vidovic>
In-Reply-To
<7v8wirirki.fsf@alter.siamese.dyndns.org>
The 14/07/09, Junio C Hamano wrote:
Show 11 quoted lines
> Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:
> 
> > And why should we accept "From "?
> 
> You are going totally in a wrong way around with this.
> 
> Berkeley mbox format is what we support, and "From " is the _only_
> delimiter between pieces of e-mail in the file.  We happen to allow "From:
> " in order to merely be extra nice for people who create mbox looking file
> by hand; I think it is an improvement not to require an optional SP after
> the colon there, but that is totally an independent issue.
I see, thank you.
Show 5 quoted lines
> I cannot offhand say if allowing anything but "From:" is necessarily an
> improvement, or making the format detection unnecessarily risky of
> misidentification.  I do not particularly like the idea of allowing only
> some randomly selected fields like Return-Path and Delibered-To and not
> accepting others, let alone totally nonstandard X-Foo fields.
I'll look at the source closer to know how it can be done the smart way.

As the manual of git-am says it accepts maildir format too (checked now), we have a regression since

	a5a6755a1d4707bf2fab7752e5c974ebf63d086a

in case of maildir _and_ "verbatim" emails starting with anything else that "From " or "From: ".

I think the RFC doesn't require any fixed order for the header fields (will check). So, I'm not very optimist because format detection starts with

	read l1
	read l2
	read l3
wich doesn't help to make a difference between mailbox and maildir.
-- 
Nicolas Sebrecht
Previous: Junio C HamanoNext: Nicolas Sebrecht
Message 6 of 10 in “git-am: less strong format "mbox" detection”
  1. git-am: less strong format "mbox" detectionNicolas Sebrecht, Jul 14, 2009
  2. Giuseppe BilottaJul 14, 2009
  3. Re: git-am: less strong format "mbox" detectionNicolas Sebrecht, Jul 14, 2009
  4. Johannes SixtJul 14, 2009
  5. Junio C HamanoJul 14, 2009
  6. Re: git-am: less strong format "mbox" detectionNicolas Sebrecht, Jul 14, 2009
  7. git-am: fix maildir support regression for unordered headers in emailsNicolas Sebrecht, Jul 15, 2009
  8. Junio C HamanoJul 15, 2009
  9. Derek FawcusJul 15, 2009
  10. Re: git-am: fix maildir support regression for unordered headers in emailsNicolas Sebrecht, Jul 15, 2009

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.