[MERGE] Bzr diff produces -p1 diffs

Sergei Organov osv at javad.com
Mon Mar 6 17:35:22 GMT 2006


Martin Pool <mbp at sourcefrog.net> writes:

> On  6 Mar 2006, Jan Hudec <bulb at ucw.cz> wrote:
>> Well, the idea is, that you can't really create a recursive -p0 diff
>> with plain diff and two trees. 
>
> That's an interesting point; I suppose that's why Linus uses it?
>
>> However it's true that many version control systems generate -p0
>> diffs. But Arch generates -p1 ones and it should be precedent for bzr,
>> no?
>
> I suppose for me it really depends on how much disruption this is
> expected to cause for things like bzrtools.  Any opinions?

I'm not sure, but I think it could bring some troubles for generic tools
that have no idea how the diff has been generated. For example, emacs
diff-mode may have troubles finding a file that has non-existing
directory name in its path and/or the path is not relative to the
current directory. I mean interactive browsing of the results of diffing
when one selects a diff chunk and emacs jumps to corresponding
file/line. Though if there will be an option to produce -p0 diffs that
won't be a big problem.

Alternatively, there should be reliable way for a program to
automatically distinguish -p0 and -p1 diffs. Unfortunately it doesn't
seem to be that easy as patch the program can't do that.

-- Sergei.





More information about the bazaar mailing list