Messages in this thread | | | Date | Sat, 5 Mar 2005 22:08:50 +0100 | From | Willy Tarreau <> | Subject | Re: [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/
| |