[Top][All Lists]

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

Re: [bug-patch] fuzz calculation change between patch 2.5.9 and 2.6

From: Andreas Gruenbacher
Subject: Re: [bug-patch] fuzz calculation change between patch 2.5.9 and 2.6
Date: Mon, 23 Nov 2009 16:45:05 +0100
User-agent: KMail/1.12.2 (Linux/; KDE/4.3.1; i686; ; )

On Monday 23 November 2009 04:07:02 Mike Frysinger wrote:
> and try to apply it:
>       patch -p0 -F3 < diff
> with patch-2.5.9 and older, you'll get an error (since the files in question 
> are missing).  with patch-2.6, the patch will "apply".
> -mike

The patch has three lines of context and with -F3, up to three lines of 
context are ignored.  The result will be rather random, but I think it could 
be argued that based on the line numbers, patch should assume that the files 
must exist.

        $ patch -p0 -F3 < diff
        patching file tripwire-2.3.1-2-p1/src/fco/fconame.h
        Hunk #1 succeeded at 48 with fuzz 3 (offset -1 lines).
        patching file tripwire-2.3.1-2-p1/src/fco/fcosetimpl.h
        Hunk #1 succeeded at 45 with fuzz 3 (offset -1 lines).
        patching file tripwire-2.3.1-2-p1/src/tw/fcoreport.h
        Hunk #1 succeeded at 84 with fuzz 3 (offset -1 lines).

BTW, the idea of counting the number of lines removed is weird -- counting the 
number of line that must match would be more meaningful.  (This is also what 
"git-apply -Cn" seems to do.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]