diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-18 20:50:24 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-18 20:50:24 (GMT) |
commit | cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b (patch) | |
tree | 3cca5122466eca387bf576ee3b3846f50e1e8ce7 /diff-tree.c | |
parent | 73848892adeaa421825672bce929b9cc16043fa9 (diff) | |
download | git-cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b.zip git-cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b.tar.gz git-cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b.tar.bz2 |
diff-tree: fix up comparison of "interesting" sub-trees
We used to trigger the "interesting subdirectory" check for any
matching name that started with the same character series, regardless
of whether it had the matching slash or not.
Diffstat (limited to 'diff-tree.c')
-rw-r--r-- | diff-tree.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/diff-tree.c b/diff-tree.c index acd1524..3bc7480 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -209,6 +209,11 @@ static int interesting(void *tree, unsigned long size, const char *base) if (pathlen > matchlen) continue; + if (matchlen > pathlen) { + if (match[pathlen] != '/') + continue; + } + if (strncmp(path, match, pathlen)) continue; |