git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: xzer <xiaozhu@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] generate a valid rfc2047 mail header for multi-line subject.
Date: Wed, 23 Feb 2011 04:48:45 -0500	[thread overview]
Message-ID: <20110223094844.GA9205@sigill.intra.peff.net> (raw)
In-Reply-To: <20110223080854.GB2724@sigill.intra.peff.net>

On Wed, Feb 23, 2011 at 03:08:54AM -0500, Jeff King wrote:

> Yeah, I think the best path forward is:
> 
>   1. Stop feeding "pre-folded" subject lines to the email formatter.
>      Give it the regular subject line with no newlines.
> 
>   2. rfc2047 encoding should encode a literal newline. Which should
>      generally never happen, but is probably the most sane thing to do
>      if it does.
> 
>   3. rfc2047 should fold all lines at some sane length. As it is now, we
>      may sometimes generate long lines in headers (though in practice, I
>      doubt this is much of a problem).

So here is a series that does this. It still doesn't preserve subject
newlines in "format-patch | am", but I don't think that was ever a goal
of the code. If we want to add it as an optional feature on top (maybe
as part of "-k"?), it should be easy to do (since the rfc2047 encoding
will now preserve embedded newlines).

  [1/3]: strbuf: add fixed-length version of add_wrapped_text
  [2/3]: format-patch: wrap long header lines
  [3/3]: format-patch: rfc2047-encode newlines in headers

-Peff

  reply	other threads:[~2011-02-23  9:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  8:09 [PATCH] generate a valid rfc2047 mail header for multi-line subject xzer
2011-02-22 20:43 ` Junio C Hamano
2011-02-23  8:08   ` Jeff King
2011-02-23  9:48     ` Jeff King [this message]
2011-02-23  9:50       ` [PATCH 1/3] strbuf: add fixed-length version of add_wrapped_text Jeff King
2011-02-23  9:58       ` [PATCH 2/3] format-patch: wrap long header lines Jeff King
2011-02-23  9:59       ` [PATCH 3/3] format-patch: rfc2047-encode newlines in headers Jeff King
2011-02-23 21:47         ` Junio C Hamano
2011-02-24  7:15           ` Jeff King
2011-02-23 15:16       ` [PATCH] generate a valid rfc2047 mail header for multi-line subject xzer
2011-02-23 16:35         ` Jeff King
2011-02-23 17:34     ` Junio C Hamano
2011-02-24  7:34       ` Jeff King
2011-02-23 15:34   ` xzer
2011-02-23 17:45     ` 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=20110223094844.GA9205@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=xiaozhu@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 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).