Re: git am and CRLF files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
> 
> Stefan

Does anyone have any comment on this ?

Regards,

Stefan
-- 
----------------------------------------------------------------
/dev/random says: Microsoft Windows... a virus with mouse support.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]