From: Linus Torvalds Date: Wed, 18 May 2005 20:50:24 +0000 (-0700) Subject: diff-tree: fix up comparison of "interesting" sub-trees X-Git-Tag: v0.99~550 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cb6c8ed2fea4515ee876c40a2bbd5541e24fc12b;p=git.git 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. --- diff --git a/diff-tree.c b/diff-tree.c index acd152434..3bc748094 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;