From: Jay Soffian <jaysoffian@gmail.com>
To: "Steven E. Harris" <seh@panix.com>
Cc: git@vger.kernel.org
Subject: Re: Using format-patch and apply against files with CRLF line endings
Date: Wed, 20 Apr 2011 11:59:45 -0400 [thread overview]
Message-ID: <BANLkTi=xNrtbwcDCHriGZ6VpxHhTfVNptA@mail.gmail.com> (raw)
In-Reply-To: <m2tydt5ekt.fsf@Spindle.sehlabs.com>
On Wed, Apr 20, 2011 at 7:48 AM, Steven E. Harris <seh@panix.com> wrote:
> Is it the case that format-patch will always emit text with LF line
> endings, or is it respecting whatever the host platform considers to be
> the proper line ending? Is the line ending in use configurable?
>
> I ask because I see that git-p4 uses format-patch and apply internally
> to apply changes against files in the Perforce workspace, and those
> files have CRLF line endings, but it looks like format-patch is emitting
> patches with LF line endings, and none of those patches will apply
> cleanly.
>
> Perhaps I just need to pipe the output from format-patch through
> unix2dos before feeding it to apply, but I'm wondering whether I'm
> barking up the wrong tree here.
The patch emitted by format-patch should have the correct (original)
line-endings, but to preserve them when the patch is applied, git-am
needs to be called with --keep-cr (also see config option
'am.keepcr').
j.
prev parent reply other threads:[~2011-04-20 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 11:48 Using format-patch and apply against files with CRLF line endings Steven E. Harris
2011-04-20 15:59 ` Jay Soffian [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='BANLkTi=xNrtbwcDCHriGZ6VpxHhTfVNptA@mail.gmail.com' \
--to=jaysoffian@gmail.com \
--cc=git@vger.kernel.org \
--cc=seh@panix.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).