lkml.org 
[lkml]   [2005]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Re: diff command line?
On Sat, Mar 05, 2005 at 09:47:44PM +0100, Bodo Eggert wrote:
> Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> > On Sat, Mar 05, 2005 at 10:48:00AM -0500, Gene Heskett wrote:
>
> >> What are the options normally used to generate a diff for public
> >> consumption on this list?
> >
> > diff -urpN orig new
> >
> > where "orig" and "new" both contain the top level "linux" directory,
> > so the resulting patch can be applied with patch -p1.
>
> This seems to be a common mistake.

I often use a simple trick to make my single file patches compatible
with both -p0 and -p1 :

diff -pruN ./dir/file.orig ./dir/file.new

The './' can either get stripped by -p1 or left as is, thus the patch
works for different scripts or people. The main disadvantage is that
there's no base version indication in the patch with this method.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.036 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site