[fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work
Alex Shishkin
alexvins at mail.ru
Thu Oct 6 16:56:30 CEST 2011
06.10.2011 16:37, Reinier Olislagers пишет:
> On 4-10-2011 14:41, Reinier Olislagers wrote:
>> On 4-10-2011 13:14, Marco van de Voort wrote:
>>> In our previous episode, Reinier Olislagers said:
>>>> Having some trouble creating patches that actually work.
>>>> (On Windows)
>>>> I've been using git to get FPC trunk and
>>>> git diff --no-prefix> %temp%\mypatch.diff
>>> I don't know about GIT, but some tips:
>>>
>>> 1. Play with lineending. (I use cygwin's dos2unix and unix2dos to convert)
> Ok, I've looked at it some more:
> Example:
> packages\fcl-extra\src\win\ServiceManager.pas
>
> svn:
> via web:
> http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-extra/src/win/ServiceManager.pas
> => Unix line endings
> Local svn:
> svn proplist -v packages\fcl-extra\src\win\ServiceManager.pas
> svn:eol-style
> native
> so:
> => WINDOWS LINE ENDINGS
> Therefore patch.exe on Windows probably works
>
> Git:
> https://github.com/graemeg/freepascal/raw/7026b7669fd422f88ffe33174dac1725c0295427/packages/fcl-extra/src/win/ServiceManager.pas
> => Unix line endings!!!!
> via git pull etc
> => Unix line endings
> not surprising...
>
> Seems the SVN client is converting line endings to my native format.
>
> Seems also that there is no way to get git to convert remote LF to local
> CRLF...
>
>
> Should I give up on git and just switch to SVN?
>
> I'm sure some more knowledgeable/alert person will have a suitable answer!
>
> Thanks,
> Reinier
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
there is git config option "core.autocrlf" try to use it
More information about the fpc-pascal
mailing list