Re: git am and CRLF files
From: Stefan Naewe <hidden>
Date: 2016-06-15 22:47:43
On 11/13/2009 10:44 AM, Stefan Naewe wrote:
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,
StefanDoes anyone have any comment on this ? Regards, Stefan -- ---------------------------------------------------------------- /dev/random says: Microsoft Windows... a virus with mouse support.