Re: Use a *real* built-in diff generator

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

 



On Sat, 25 Mar 2006, Linus Torvalds wrote:

I don't need "patch", since I wrote my own anyway. It's just called
"apply" instead of "patch".

Oh, ok. I thought you were calling out GNU patch for the task.


Doing "apply" is not only much simpler than doing "diff", but I needed my
own much earlier: it's much more timing-critical for me (applying 200
patches in one go), and git needed something that could honor renames and
copies, and the mode bits too.

Besides, I hate how GNU patch bends over backwards in applying crap that
isn't a proper patch at all (whitespace-corruption, you name it: GNU patch
will accept it). Also, I made "git-apply" be all-or-nothing: either it
applies the _whole_ patch (across many different files) or it applies none
of it. With GNU patch, if you get an error on the fifth file, the four
first files have been modified already - aarrgghhh..

See "apply.c" for details if you care. It's stupid, but it works (and it
_only_ handles unified diffs - with the git extensions, of course).

So is xdl_patch(). It handles unified diffs, a simple ignore whitespace changes, and all (methink) the fuzzy merge features of GNU patch. Okie then, drop me an email if you find bugs in the libxdiff code, so I can fix the main library.



- Davide


-
: 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]