projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed1a368
)
diff-tree: don't match non-directories as partial pathnames
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 18 May 2005 21:17:22 +0000
(14:17 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 18 May 2005 21:17:22 +0000
(14:17 -0700)
This normally doesn't matter, but if you have a filename that is
sometimes a directory and sometimes a regular file (or symlink),
we don't want the regular file case to trigger a "partial match".
diff-tree.c
patch
|
blob
|
history
diff --git
a/diff-tree.c
b/diff-tree.c
index 8fb5729363e4d85ff0a88173f05140bab43aa42f..59d12f2ba1325bad77dd062936c20cd9cc4d602f 100644
(file)
--- a/
diff-tree.c
+++ b/
diff-tree.c
@@
-204,6
+204,8
@@
static int interesting(void *tree, unsigned long size, const char *base)
if (matchlen > pathlen) {
if (match[pathlen] != '/')
continue;
+ if (!S_ISDIR(mode))
+ continue;
}
if (strncmp(path, match, pathlen))