Lobbying for -p1 diffs

Michael Ellerman michael at ellerman.id.au
Wed Mar 1 23:54:17 GMT 2006


On 3/2/06, Matthew D. Fuller <fullermd at over-yonder.net> wrote:
> On Thu, Mar 02, 2006 at 10:10:32AM +1100 I heard the voice of
> Michael Ellerman, and lo! it spake thus:
> >
> > But seriously, what's your objection to -p1 ? You don't have a '1'
> > key ?
>
> Heck yeah.  It takes forever to type
> % patch -p`sh -c 'echo $((3-2))'`

SOOO much harder than:
% patch -p`sh -c 'echo $((3-3))'`

:D

> But more, it's:
>
> - Why should I *HAVE* to type a -p to patch, when I just made the
>   diff?  -p is for munging diffs from other sources when necessary,
>   not as a standard step for your own!

No, -p is for applying a patch to a file that's not in the current
directory. And on any serious source tree that means *every patch*. So
if you're typing -p0 anyway, you might as well by typing -p1.

> And more immediately,
>
> - 95% or better of my use of diff isn't intended for patch, it's
>   intended for my eyes.  Having those extra dirs there means I need to
>   stop, and carefully read and interpret those lines to figure out
>   what they mean, instead of just a quick glance to tell me where I
>   am.

Ah bollocks, it's a couple of extra characters on the front of the path!

cheers




More information about the bazaar mailing list