Browse Source

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.
maint
Linus Torvalds 20 years ago
parent
commit
cb6c8ed2fe
  1. 5
      diff-tree.c

5
diff-tree.c

@ -209,6 +209,11 @@ static int interesting(void *tree, unsigned long size, const char *base) @@ -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…
Cancel
Save