All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Magnus Bäck" <magnus.back@sonyericsson.com>
To: git@vger.kernel.org
Cc: Andrew Eikum <aeikum@codeweavers.com>, Jeff King <peff@peff.net>
Subject: Re: imap-send badly handles commit bodies beginning with "From <"
Date: Sun, 30 Oct 2011 10:01:11 +0100	[thread overview]
Message-ID: <20111030090111.GA1624@jpl.local> (raw)
In-Reply-To: <20111028203256.GA15082@sigill.intra.peff.net>

On Friday, October 28, 2011 at 22:32 CEST,
     Jeff King <peff@peff.net> wrote:

> On Fri, Oct 28, 2011 at 01:00:44PM -0500, Andrew Eikum wrote:
> 
> > On the server side, it was split into two mails on either side
> > of that commit message's From line with neither mail actually
> > containing the From line. To fix it, I just changed it to "Copied
> > from <url>:" :-P
> > 
> > Ain't mbox grand?
> 
> Mbox does have this problem, but I think in this case it is a
> particularly crappy implementation of mbox in imap-send. Look at
> imap-send.c:split_msg; it just looks for "From ".

While there seems to be about a million different implementations of
mbox creation and parsing, the relevant RFC[0] points to [1] as an
authoritative source. The latter claims that lines matching "^From "
denote a message boundary and that lines within a message that match
the same pattern should be quoted with ">". That would suggest that
the problem isn't imap-send.c but whatever code produces the mbox
file in the first place. Of course, if that software isn't part of
Git I guess we'll have to deal with the situation anyway. And whatever
the RFCs say, we still need to be as compatible is possible with
whatever software is out there.

> It should at least check for something that looks like a timestamp,
> like git-mailsplit does. Maybe mailsplit's is_from_line should be
> factored out so that it can be reused in imap-send.

I guess that's a reasonable "liberal in what you accept" mitigation.

(As a sidenote, I'm getting the ">From" quoting in my maildir message
files where no such quoting is expected, so "From" lines are shown as
">From" in my MUA. I don't know if it's Procmail screwing things up or
what's going on.)

[0] http://tools.ietf.org/html/rfc4155
[1] http://qmail.org./man/man5/mbox.html

-- 
Magnus Bäck                   Opinions are my own and do not necessarily
SW Configuration Manager      represent the ones of my employer, etc.
Sony Ericsson

  parent reply	other threads:[~2011-10-30  9:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 18:00 imap-send badly handles commit bodies beginning with "From <" Andrew Eikum
2011-10-28 20:32 ` Jeff King
2011-10-28 21:21   ` Andrew Eikum
2011-10-28 21:37     ` Jeff King
2011-10-30  9:01   ` Magnus Bäck [this message]
2011-11-01 15:38     ` Jeff King
2011-11-01 16:06       ` Michael Haggerty
2011-11-01 16:14         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111030090111.GA1624@jpl.local \
    --to=magnus.back@sonyericsson.com \
    --cc=aeikum@codeweavers.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.