Subject: Re: [PATCH] format-patch: Use --mbox by default.

From: Andreas Ericsson <[email-masked]>
Date: Mon, 09 Jan 2006 03:01:30 +0100

Junio C Hamano wrote:
> Andreas Ericsson <[email-masked]> writes:
> 
> 
>>This patch enables a slightly modified and more correct --mbox
>>output by default. The --date, --author and --mbox options
>>are obsoleted and removed.
> 
> 
> I always use format-patch with -k -m (or -k --stdout), so I have
> no objections to making --mbox the default.  I do not think
> anybody uses --date or --author in their scripts, but removing
> the --mbox option _might_ break things for people's scripts.
> Maybe it is worthwhile to keep it as a no-op option for a while.
> 

The reworked patch (which works for sending patches to myself, so far), 
prints a warning to stderr that a deprecated option is used and then 
silently ignores it.

> 
>>The patches generated also had bad mail headers for sendmail (of
>>postfix 2.2.2 at least) to use directly (From: line must be on top,
>>Subject: last of header),...
> 
> 
> I do not think RFC2822 specifies that.  See "3.6 Field
> definitions", third paragraph, first two sentences.
> 
> In that sense, technically they are not "bad mail headers", but
> at the same time, since it is valid in any order, if _one_
> popular MTA is unconfortable with a particular ordering, we
> could order things differently to make it happier (mind you,
> this would not work for more than one such broken MTAs).
> 

The only thing I've seen break is if Subject: is placed on top. It's 
easier, script-wise, to put it last and that seems to work with qmail 
and postfix both.

> Another thing I've been considering is to handle UTF-8 (or
> i18n.commitencoding in general) a bit better.  We currently do
> not have Content-Type: header, so if you pipe the output to
> "am", it must be invoked without "-u" to make sure that it takes
> things as-is ("am -u" assumes things are in latin1 without
> Content-Type:).  If we start to tackle that issue, we might also
> want to do RFC2047 in headers.
> 
> 

You'll have to ask someone else for that. I have no idea how it works 
and I wouldn't know how to begin doing it in shell.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231