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:
parent
73848892ad
commit
cb6c8ed2fe
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user