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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user