git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: <git@vger.kernel.org>
Subject: Re: git-am doesn't strip CRLF line endings when the mbox is base64-encoded
Date: Mon, 6 Jan 2020 11:58:48 +0000	[thread overview]
Message-ID: <0c18df58-9d1d-550f-d69e-d6ffe6c01858@citrix.com> (raw)
In-Reply-To: <dece7350-7b58-bf19-9fdf-4ccf8df268fb@citrix.com>

On 12/18/19 12:15 PM, George Dunlap wrote:
> On 12/18/19 11:42 AM, George Dunlap wrote:
>> Using git 2.24.0 from Debian testing.
>>
>> It seems that git-am will strip CRLF endings from mails before applying
>> patches when the mail isn't encoded in any way.  It will also decode
>> base64-encoded mails.  But it won't strip CRLF endings from
>> base64-encoded mails.
>>
>> Attached are two mbox files for two different recent series.
>> plainenc.am applies cleanly with `git am`, while base64enc.am doesn't.
>>
>> Poking around the man pages, it looks like part of the issue might be
>> that the CRLF stripping is done in `git mailsplit`, before the base64
>> encoding, rather than after.
> 
> Poking around -- it looks like the CRLF stripping would be better done
> in `git mailinfo` after the decoding.

Anyone want to take this up?  I mean, I could try to send a patch, but
since I've never looked at the git source code before, I'm sure it would
take me about 10x as much effort for me to do it as for someone already
familiar with the codebase.

(And I've already done that work for stackgit:
https://github.com/ctmarinas/stgit/pull/46)

 -George

  parent reply	other threads:[~2020-01-06 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 11:42 git-am doesn't strip CRLF line endings when the mbox is base64-encoded George Dunlap
2019-12-18 12:15 ` George Dunlap
2019-12-18 19:41   ` Todd Zullinger
2020-01-06 11:58   ` George Dunlap [this message]
2020-01-06 17:07     ` Junio C Hamano
2020-01-06 18:10       ` George Dunlap

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c18df58-9d1d-550f-d69e-d6ffe6c01858@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).