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.
This commit is contained in:
Linus Torvalds 2005-05-18 13:50:24 -07:00
parent 73848892ad
commit cb6c8ed2fe

View File

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