git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Cc: Michael Mc Donnell <michael@mcdonnell.dk>, git@vger.kernel.org
Subject: Re: git imap-send converting my patches to CRLF line endings?
Date: Fri, 17 Jun 2011 11:02:15 -0400	[thread overview]
Message-ID: <20110617150215.GA11946@sigill.intra.peff.net> (raw)
In-Reply-To: <QMrPJrj9ztlKRRk907LM0hozdFOSLjShMt2uDhbAk6DGxE1OSBFMkg@cipher.nrlssc.navy.mil>

On Fri, Jun 17, 2011 at 09:47:17AM -0500, Brandon Casey wrote:

> > The canonical line ending for mail is CRLF. So yes, it will convert your
> > patch to CRLF for storage. But anything pulling it out of the IMAP
> > folder should convert it back to native line endings.
> 
> Not always.  Modern thunderbird (3.1.10, is that modern? I haven't
> checked), saves mail using CRLF.  I don't have access to gmail at the
> moment, but I'm pretty sure gmail does the same thing, i.e. when you
> select "view original", and then use your browser to "save as...".
> 
> mailsplit was modified to strip CRLF when splitting mail here:
> 
>   c2ca1d7 Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
> 
> which should have first appeared in git v1.6.5.

Ah, I forgot about that. I am used to unix-y tools like mutt. But it is
obviously sensible for git to accept canonical mail via am, given that
some clients produce it.

> > How do you download and apply the patch exactly? If you are speaking
> > imap to gmail, generally the client would strip out the CR's from the
> > mail.
> 
> Michael, how are you applying the "email"?  Are you using 'git am'? or
> possibly are you trying to use 'git apply'?  You need to use 'git am'.

In another reply that crossed paths with yours, he wrote:

  5. Apply patch on a fresh branch with git apply.

So yeah, I think that is the problem.

-Peff

      reply	other threads:[~2011-06-17 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 13:35 git imap-send converting my patches to CRLF line endings? Michael Mc Donnell
2011-06-17 14:14 ` Jeff King
2011-06-17 14:45   ` Michael Mc Donnell
2011-06-17 15:08     ` Brandon Casey
2011-06-17 15:37       ` Brandon Casey
2011-06-17 15:50         ` Jeff King
2011-06-17 16:54           ` Brandon Casey
2011-06-20 10:40             ` Michael Mc Donnell
2011-06-17 14:47   ` Brandon Casey
2011-06-17 15:02     ` Jeff King [this message]

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=20110617150215.GA11946@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=brandon.casey.ctr@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=michael@mcdonnell.dk \
    /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).