git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] git-send-email: add --transfer-encoding option for conversion to specified encoding

From
Paolo Bonzini <bonzini@gnu.org>
Date
Nov 25, 2014, 14:00 UTC
Message-ID
<1416924027-29862-1-git-send-email-bonzini@gnu.org>
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: Paolo Bonzini
Message 1 of 5 in “git-send-email: add --transfer-encoding option for conversion to specified encoding”
  1. 0/2 git-send-email: add --transfer-encoding option for conversion to specified encodingPaolo Bonzini, Nov 25, 2014
  2. 1/2 git-send-email: delay creation of MIME headersPaolo Bonzini, Nov 25, 2014
  3. 2/2 git-send-email: add --transfer-encoding optionPaolo Bonzini, Nov 25, 2014
  4. Eric SunshineNov 25, 2014
  5. Junio C HamanoNov 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.