git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
To: git@vger.kernel.org
Subject: git am and CRLF files
Date: Fri, 13 Nov 2009 10:44:47 +0100	[thread overview]
Message-ID: <4AFD2A8F.7000806@atlas-elektronik.com> (raw)

Hi there.
I have:

$ git version
git version 1.6.5.1.1367.gcd48

$ git config --get core.autocrlf
false

A repository with some UNIX (LF) and some Windows (CRLF) files.
(and no: I will not change the files. My editors handle CRLF and LF correctly)

My problem:

'git am' can't handle changes in CRLF files because the patch
gets converted (by git mailsplit) to contain only LF.

Which is wrong IMHO.

git-am on my msysgit version looks like this (lines: 214++)

<---------->
split_patches () {
	case "$patch_format" in
	mbox)
		case "$rebasing" in
		'')
			keep_cr= ;;
		?*)
			keep_cr=--keep-cr ;;
		esac
		git mailsplit -d"$prec" -o"$dotest" -b $keep_cr -- "$@" > "$dotest/last" ||
		clean_abort
		;;
<---------->

The '--keep-cr' flags is passed to git mailsplit when git am is in 'rebasing' mode.
By looking through git-am I found that I can pass "--rebasing" to git am to get my
patch applied correctly.
But why is git am behaving that way ?

Puzzled,

Stefan
-- 
----------------------------------------------------------------
/dev/random says: I'm dangerous when I know what I'm doing.

             reply	other threads:[~2009-11-13 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  9:44 Stefan Naewe [this message]
2009-11-16  7:33 ` git am and CRLF files Stefan Naewe
2009-11-16 10:50   ` Nanako Shiraishi
2009-11-16 11:15     ` Stefan Naewe
2009-11-16 11:43     ` Erik Faye-Lund
2009-11-30 12:06       ` Daniele Segato
2009-11-30 12:50         ` Ismael Luceno

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=4AFD2A8F.7000806@atlas-elektronik.com \
    --to=stefan.naewe@atlas-elektronik.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.
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).