All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Mark Einon <mark.einon@gmail.com>,
	devel@driverdev.osuosl.org, git@vger.kernel.org
Subject: Re: [PATCH 4/8] staging: et131x: Remove ununsed statistics
Date: Sat, 13 Sep 2014 16:36:45 -0400	[thread overview]
Message-ID: <20140913203645.GB24854@peff.net> (raw)
In-Reply-To: <20140913154556.GA12361@kroah.com>

On Sat, Sep 13, 2014 at 08:45:56AM -0700, Greg KH wrote:

> On Sat, Sep 13, 2014 at 12:37:46PM +0300, Dan Carpenter wrote:
> > On Thu, Sep 11, 2014 at 10:59:42PM +0100, Mark Einon wrote:
> > > >From struct ce_stats; unicast_pkts_rcvd, unicast_pkts_xmtd,
> > > multicast_pkts_xmtd, broadcast_pkts_rcvd and broadcast_pkts_xmtd
> > 
> > For some reason something adds a '>' to the start of lines which start
> > with 'From'.  I don't know what it is...
> 
> It's an email protocol requirement, some RFC dictates it as "From" at
> the start of the line is an email "start" flag.

It's not an RFC thing. It's a side effect of the mbox format, which
squashes together multiple messages with "From " lines to mark their
starts. So many mbox implementations will quote them as ">From" (others
introduce a Content-Length header, or are simply more careful about
making sure that the line looks like a real "From " line, which should
contain a date).

If somebody's MUA is actually transmitting emails with the quoting,
that's wrong. It is a local storage problem, and they should not be
spreading the quoting disease to other systems.

> > When I apply this patch with 'git am' then it just removes the From
> > line.
> 
> As it should :)

That seems wrong. We should either leave it as-is (i.e., assume the
writer used no quoting and really did mean ">From") or strip the ">" to
turn it into "From" (i.e., assume the writer did use quoting). In some
implementations, a literal ">From" gets quoted to ">>From" and so on. So
we could even strip one level of quoting from such things (if we assume
the writer was such an implementation).

I don't think we can make this 100% foolproof without knowing which mbox
variant the writer used. But dropping the line is probably the worst
possible thing, as it does not match _any_ variants. :)

-Peff

  parent reply	other threads:[~2014-09-13 20:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1410472786-14552-1-git-send-email-mark.einon@gmail.com>
     [not found] ` <1410472786-14552-5-git-send-email-mark.einon@gmail.com>
2014-09-13  9:37   ` [PATCH 4/8] staging: et131x: Remove ununsed statistics Dan Carpenter
2014-09-13 15:45     ` Greg KH
2014-09-13 19:41       ` Dan Carpenter
2014-09-13 20:36       ` Jeff King [this message]
2014-09-13 20:47         ` Mark Einon
2014-09-13 20:57           ` Dan Carpenter
2014-09-13 21:06             ` Mark Einon
2014-09-13 21:09             ` Dan Carpenter
2014-09-13 21:25               ` [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers Jeff King
2014-09-13 22:57                 ` brian m. carlson
2014-09-14  0:47                   ` Jeff King
2014-09-14  0:55                     ` Junio C Hamano
2014-09-14  1:01                       ` Jeff King
2014-09-14  1:30                         ` Jeff King
2014-09-15 18:56                           ` Junio C Hamano
2014-09-15 20:15                             ` Junio C Hamano
2014-09-16  0:19                               ` Jeff King
2014-09-16 18:01                                 ` Junio C Hamano
2014-09-16 18:41                                   ` Junio C Hamano
2014-09-16 20:29                                     ` Jeff King
2014-09-16  0:12                             ` Jeff King
2014-09-15 17:55                         ` Junio C Hamano

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=20140913203645.GB24854@peff.net \
    --to=peff@peff.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=git@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=mark.einon@gmail.com \
    /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.