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".maint
parent
ed1a368ba1
commit
850e82d889
|
@ -204,6 +204,8 @@ static int interesting(void *tree, unsigned long size, const char *base)
|
||||||
if (matchlen > pathlen) {
|
if (matchlen > pathlen) {
|
||||||
if (match[pathlen] != '/')
|
if (match[pathlen] != '/')
|
||||||
continue;
|
continue;
|
||||||
|
if (!S_ISDIR(mode))
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp(path, match, pathlen))
|
if (strncmp(path, match, pathlen))
|
||||||
|
|
Loading…
Reference in New Issue