[fpc-pascal] [Semi-OT] Git format patches don't seem to work
Reinier Olislagers
reinierolislagers at gmail.com
Tue Oct 4 12:55:36 CEST 2011
Hi all,
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
rem --no-prefix : Do not show any source or destination prefix.
to create patches.
Using Msysgit:
git --version
git version 1.7.6.msysgit.0
However, if I try to apply the patch with
cd /d c:\development\fpc\source
rem use fpc binutils patch
patch -p0 < %temp%\mypatch.diff
I often get a nasty error:
patching file `packages/fcl-extra/src/win/ServiceManager.pas'
Assertion failed: hunk, file patch.c, line 321
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
Patch version:
patch --version
patch 2.5
Copyright 1988 Larry Wall
Copyright 1997 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
written by Larry Wall with lots o' patches by Paul Eggert
As an alternative, I've used diff with two directories like this:
diff -u --minimal --recursive --unified -N olddir newdir > mypatch.diff
but that may have some issues with Linux/Windows line endings..
Any suggestions for creating/applying better patches using git or diff?
Thanks,
Reinier
More information about the fpc-pascal
mailing list