diff-tree: don't match non-directories as partial pathnames
[git.git] / diff-tree.c
index 8fb5729..59d12f2 100644 (file)
@@ -204,6 +204,8 @@ static int interesting(void *tree, unsigned long size, const char *base)
                if (matchlen > pathlen) {
                        if (match[pathlen] != '/')
                                continue;
+                       if (!S_ISDIR(mode))
+                               continue;
                }
 
                if (strncmp(path, match, pathlen))