[H-GEN] using patch
Edwin Groothuis
edwin at mavetju.org
Sat Mar 15 06:55:23 EST 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
On Sat, Mar 15, 2003 at 08:51:07PM +1000, Robert Stanford wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
> On Sat, 2003-03-15 at 14:51, Edwin Groothuis wrote:
>
> > They only work with sources which are the same as the original code.
> > They only work if you haven't changed a single line. They only work
> > under these special conditions.
>
> Then what are these offsets patch often mentions?
Fuzzy logic, the assumption that if the same string in the lines
is found at a different place that they could be the part which has
to be replaced.
If this is your original file, starting at line 0:
line
line
line
line
line
burps
line
line
line
line
line
And this is the unified patch, based on a piece of code which doesn't
match your version of the code, which tells to replace the "line"
on line 5 with "blaat":
@@ 3,5 3,5 @@
line
line
-line
+blaat
line
line
Fuzzy logic could make it like this, with an offset of -3:
line
line
blaat
line
line
burps
[..]
Or with an offset of +2
[..]
burps
line
line
blaat
line
line
But which one is the right one? Specially if you changed your version
that line 5 "line" already with "burps" while this patch is trying
to change it to "blaat".
Edwin
--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin at mavetju.org | Weblog: http://www.mavetju.org/weblog/weblog.php
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list