[fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

Marco van de Voort marcov at stack.nl
Fri Oct 7 11:28:45 CEST 2011


In our previous episode, Graeme Geldenhuys said:
> > So while it could be used, I'd have to remember to run unix2dos over it
> > - that is, if people expect a Windows patch (
> 
> I don't think that is needed. I believe the 'patch' program will sort
> that out by itself. I have sent numerous patches to FPC and Lazarus
> (both those repositories are git ones on my Linux system). Nobody has
> ever complained that the EOL style was wrong. I also don't specify the
> --no-prefix when creating patches. Again, the 'patch' program can handle
> those a/... b/... prefixes for the committer without problems.

I usually apply patches on FreeBSD, and in rarer cases Linux.

Even up to date patch doesn't always process lineendings properly btw. I
have to dos2unix often on *nix too.

Recently a lot of patches with incorrect filenames, or no filenames if the
patch is for a single file, or even not in universal format have been
submitted, and it takes some work (doable, but annoying) to apply them.

Since the patches aren't tagged with what generated them, I assumed it was
GIT based.



More information about the fpc-pascal mailing list