[fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work
reinierolislagers at gmail.com
Thu Oct 6 20:41:21 CEST 2011
On 6-10-2011 17:04, Alex Shishkin wrote:
> 06.10.2011 18:59, Reinier Olislagers пишет:
>> Thanks Alex, I already fiddled with that. I'll try again with
>> core.autocrlf set to true and false to make sure it doesn't work...
> not "true" not "false", but "input". Read this if have not yet :
> http://progit.org/book/ch7-1.html http://help.github.com/line-endings/
Alex & the rest, seems I'm doing something wrong when using input:
rem go to right directory:
cd /d c:\development\fpc\
rem get rid of any gunk there:
rmdir /s /q source
rem set autocrlf to input for entire git system
git config --global core.autocrlf input
rem check setting - yes, input:
git config --global core.autocrlf
cd /d c:\development\fpc\source
git clone --depth 5 git://github.com/graemeg/freepascal.git .
rem check situation here - yes, still input:
git config core.autocrlf
rem now use notepad++ to open a file:
!!!notepad++ shows it has Unix line endings!!!!
Could be that I'm misinterpreting the docs/sites, but isn't input
supposed to convert the LFs in the repository to CRLFs?
Tried again using core.autocrlf true, this does result in Windows line
Creating a patch using git diff --no-prefix gives Unix line endings - as
So while it could be used, I'd have to remember to run unix2dos over it
- that is, if people expect a Windows patch (
Am I doing something stupid with autocrlf input?
More information about the fpc-pascal