[patch] remove default diff prefix; support -p0 and -p1

Martin Pool mbp at sourcefrog.net
Fri May 5 03:47:04 BST 2006


On  4 May 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Martin Pool wrote:
> > * change diffs back to not having path prefixes by default
> > * you can specify them with 'diff --prefix OLD:NEW'
> >   (note that this has changed from 'diff --diff-prefix', which seemed a bit
> >    redundant)
> > * you can also just say 'diff -p0' (gives the default) or 'diff -p1'
> > 
> > I plan to put this in 0.8
> 
> If I read the patch correctly, doesn't this make 'bzr diff' do:
> 
> === renamed file/foo => file/baz
> --- old/file/baz
> +++ new/file/baz
> ...
> 
> I'm just wondering why you decided to not be consistent between the
> '===' lines, and the ---/+++ lines.
> 
> I suppose patch doesn't actually pay attention to those lines. I'm just
> wondering about consistency.

Yes, it does do that.  patch doesn't pay attention to those lines;
they're specific to bzr as far as I know.

It just looked strange to me to have

=== added file a/foo
=== removed file b/loo

-- 
Martin




More information about the bazaar mailing list