From: Paolo Bonzini <bonzini@gnu.org>
To: git@vger.kernel.org
Cc: lersek@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH 0/2] git-send-email: add --transfer-encoding option for conversion to specified encoding
Date: Tue, 25 Nov 2014 15:00:25 +0100 [thread overview]
Message-ID: <1416924027-29862-1-git-send-email-bonzini@gnu.org> (raw)
From: Paolo Bonzini <pbonzini@redhat.com>
The thread at http://thread.gmane.org/gmane.comp.version-control.git/257392
details problems when applying patches with "git am" in a repository with
CRLF line endings. In the example in the thread, the repository originated
from "git-svn" so it is not possible to use core.eol and friends on it.
Right now, the best option is to use "git am --keep-cr". However, when
a patch create new files, the patch application process will reject the
new file because it finds a "/dev/null\r" string instead of "/dev/null".
The problem is that SMTP transport is CRLF-unsafe; "git am --keep-cr" is
mostly working by chance and it would be very problematic to have a "git
am" workflow in a repository with mixed LF and CRLF line endings. It is
more robust to forgo readable patch files[1] and use the quoted-printable
transfer enconding. This series adds an option and configuration key
to git-send-email that lets it automatically produce quoted-printable
or base64 messages.
Paolo
[1] A useful oneliner to decode quoted-printable files is the following:
perl -pe 'use MIME::QuotedPrint; $_=MIME::QuotedPrint::decode($_);'
Paolo Bonzini (2):
git-send-email: delay creation of MIME headers
git-send-email: add --transfer-encoding option
Documentation/config.txt | 1 +
Documentation/git-send-email.txt | 10 +++
contrib/completion/git-completion.bash | 4 +
git-send-email.perl | 61 +++++++++++--
t/t9001-send-email.sh | 157 +++++++++++++++++++++++++++++++++
5 files changed, 227 insertions(+), 6 deletions(-)
--
2.1.0
next reply other threads:[~2014-11-25 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 14:00 Paolo Bonzini [this message]
2014-11-25 14:00 ` [PATCH 1/2] git-send-email: delay creation of MIME headers Paolo Bonzini
2014-11-25 14:00 ` [PATCH 2/2] git-send-email: add --transfer-encoding option Paolo Bonzini
2014-11-25 20:44 ` Eric Sunshine
2014-11-25 23:37 ` 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=1416924027-29862-1-git-send-email-bonzini@gnu.org \
--to=bonzini@gnu.org \
--cc=git@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.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).