X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=diff-tree.c;h=3bc7480944037e1c0964217d35b5f1014e4f43fd;hb=cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b;hp=acd15243435742fdeb3bbdc29c1ff7ffa27cbb2f;hpb=73848892adeaa421825672bce929b9cc16043fa9;p=git.git diff --git a/diff-tree.c b/diff-tree.c index acd15243..3bc74809 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;