diff-tree: don't match non-directories as partial pathnames

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".
This commit is contained in:
Linus Torvalds 2005-05-18 14:17:22 -07:00
parent ed1a368ba1
commit 850e82d889

View file

@ -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))