quoted
quoted
quoted
quoted
"LT" == Linus Torvalds [off-list ref] writes:
LT> I also wonder whether "-p" should turn on recursion by default (for all
LT> the tools). "-p" without "-r" doesn't really seem to make much sense, does
LT> it?
When I know which path I am interested in,
$ diff-tree -p <tree-1> <tree-2> ls-tree.c
would still get the benefit of not descending down into ppc and
mozilla-sha1 subdirectories, if I am not mistaken.
Think of the kernel sources, and I would say leaving the option
of not recursing down is a good thing.
On Wed, 27 Apr 2005, Junio C Hamano wrote:
When I know which path I am interested in,
$ diff-tree -p <tree-1> <tree-2> ls-tree.c
would still get the benefit of not descending down into ppc and
mozilla-sha1 subdirectories, if I am not mistaken.
It won't. It will see that those two aren't interesting, because they
don't match the pathname, so it will ignore them regardless of whether
there is a -r or not.
Think of the kernel sources, and I would say leaving the option
of not recursing down is a good thing.
Well, if you give pathnames, it's always going to limit recursion to only
those subdirectories that match one of them.
And if you don't give pathnames, then nor recursing will do something
pretty strange, ie give a diff of only the files in the top-level
directory, and totally ignore the subdirectories that did change:
torvalds@ppc970:~/v2.6/linux> diff-tree e8108c98dd6d65613fa0ec9d2300f89c48d554bf $(cat .git/HEAD)
*040000->040000 tree d44b45026cd1c9530a78756b11d6bb9a78718cc3->474afcccb9cac147aa3b95a9afdd91c2edb139f5 arch
*040000->040000 tree 2394cd732a73c793ba93c32be6e7f058bd7171d8->da5f26fc8b12defe39e58b76e8087281effbf6bf drivers
*040000->040000 tree 8d5010b0ff2b7325131536c63ed04071a563e310->cf51450069a2ab187b611599d1a0e037f176c6c3 fs
*040000->040000 tree a06b4fb363dcfd3225cfe3ac3a0aa02e8d628975->c27a22db91b056499a5c1198ace432768475b5bd include
and then
torvalds@ppc970:~/v2.6/linux> diff-tree -p e8108c98dd6d65613fa0ec9d2300f89c48d554bf $(cat .git/HEAD)
<no output what-so-ever>
where showing things as if nothing changed seems to be actively _wrong_,
I'd say..
Linus