help-gnu-utils
[Top][All Lists]
Advanced

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

Re: diff/patch with subdirectories


From: Roger Leigh
Subject: Re: diff/patch with subdirectories
Date: Tue, 15 Jun 2004 19:02:39 +0100
User-agent: slrn/0.9.8.0 (Linux)

On 2004-06-14, Guy Rouillier <guy-rouillier@speakeasy.net> wrote:
> --- from/aaa    2004-06-13 00:27:54.349910512 -0400
> +++ to/aaa      2004-06-13 00:28:15.889635976 -0400
> @@ -1 +1 @@
> -abc
> +def
>
> Now running patch produces this:
>
> patch -u -p0 <sub.diff
> patching file to/aaa
> Reversed (or previously applied) patch detected!  Assume -R? [n]

Use "patch -p1 < patchfile" to strip off the top-level of the path.

At a later stage, if you're generating a patch for a whole directory
tree, "diff -urN" usually does the right thing.



-- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.


reply via email to

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