diff --git a/diff-tree.c b/diff-tree.c index acd1524343..3bc7480944 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -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;