git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git am and CRLF files
@ 2009-11-13  9:44 Stefan Naewe
  2009-11-16  7:33 ` Stefan Naewe
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Naewe @ 2009-11-13  9:44 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-30 12:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13  9:44 git am and CRLF files Stefan Naewe
2009-11-16  7:33 ` 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

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).