git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] format-patch: Properly escape From_ lines when creating an mbox.
Date: Thu, 10 Jun 2010 08:52:33 -0700	[thread overview]
Message-ID: <87mxv2hola.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <87pqzyhpl2.fsf@yoom.home.cworth.org>

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

On Thu, 10 Jun 2010 08:31:05 -0700, Carl Worth <cworth@cworth.org> wrote:
> I suppose we could maintain compatibility with any scripts, etc. by
> still emitting the initial "From " line, but declaring these files as
> messages (not mbox) and avoiding doing any quoting for them.
> 
> I think that gets us all the upsides with no downsides. I'll send one
> last patch for that.

Thinking about implementing and testing this, I realized that a file
that looks like an mbox but isn't an mbox will confuse "git am"
slightly. It will think that it should unquote any ">From " lines, but
that would end up being the technically wrong thing to do since the
lines aren't quoted.

I'm not sure what to do here that would cause the least undesirable
breakage. Ignore this problem? Emit a line that still contains anything
that scripts might be looking for but that "git am" could key off of as
"not actually an mbox"?

I suppose we could put a magic timestamp there, but that feels pretty
creepy and fragile.

Another option would be to just emit RFC2822 messages unless the user
passes an explicit option to format-patch (such as --mbox, which would
be implied by --stdout). Then git would generate legitimate (unqoted)
messages and legitimate (quoted) mbox files.

I'd leave it to you to decide whether the --mbox option should be on by
default or phased in with a warning or whatever.

What do you think?

-Carl

-- 
carl.d.worth@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2010-06-10 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09  1:01 [PATCH] format-patch: Properly escape From_ lines when creating an mbox Carl Worth
2010-06-09  3:50 ` Junio C Hamano
2010-06-09  5:14   ` Carl Worth
2010-06-09 16:56     ` Carl Worth
2010-06-10 14:49     ` Junio C Hamano
2010-06-10 15:31       ` Carl Worth
2010-06-10 15:52         ` Carl Worth [this message]
2010-06-10 16:12           ` Junio C Hamano
2010-06-10 16:30             ` Carl Worth
2010-06-09  5:48   ` H. Peter Anvin
2010-06-09  7:04     ` Carl Worth

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=87mxv2hola.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hpa@zytor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).