Broken directory pathname pruning..
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 27, 2005, 00:41 UTC
- Message-ID
- <Pine.LNX.4.58.0505261731050.17207@ppc970.osdl.org>
The directory-based pathname pruning doesn't work any more.
I used to just say
git-whatchanged -v -p drivers/usb/
and I just noticed that it doesn't work any more.
It _does_ work if I leave the final '/' off the thing.
diff-tree itself does this right: that's shown by the fact that with the slash in place, we still do get the right _changelog_ that is restricted to drivers/usb changes, but the diffs themselves are missing.
So it seems to be purely "diffcore_pathspec()" that is broken.
Btw, I don't think we should call "diffcore_pathspec()" at all in diff-tree, because diff-tree already handles "interesting" paths correctly (and has to do so for performance reasons, since it's not acceptable to expand all the trees and diff them).
So in the "git-whatchanged" case the fix is as simple as just removing those two lines, but the bug then continues to exist in the other *diff* programs..
Junio?
Linus
diff --git a/diff-tree.c b/diff-tree.c --- a/diff-tree.c +++ b/diff-tree.c @@ -268,8 +268,6 @@ static int call_diff_flush(void) diff_flush(DIFF_FORMAT_NO_OUTPUT, 0); return 0; } - if (nr_paths) - diffcore_pathspec(paths); if (header) { if (diff_output_format == DIFF_FORMAT_MACHINE) { const char *ep, *cp;