aboutsummaryrefslogtreecommitdiff
path: root/diff-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-18 14:17:22 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-18 14:17:22 -0700
commit850e82d889f374465dc7aa6cb4af3098c7e02f1f (patch)
treebf911c3717bf756f25806f7ec1f884e13fcc61e6 /diff-tree.c
parented1a368ba137898bf012dbb8cda0a4cac89d64da (diff)
downloadgit-850e82d889f374465dc7aa6cb4af3098c7e02f1f.tar.gz
git-850e82d889f374465dc7aa6cb4af3098c7e02f1f.tar.xz
diff-tree: don't match non-directories as partial pathnames
This normally doesn't matter, but if you have a filename that is sometimes a directory and sometimes a regular file (or symlink), we don't want the regular file case to trigger a "partial match".
Diffstat (limited to 'diff-tree.c')
-rw-r--r--diff-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff-tree.c b/diff-tree.c
index 8fb572936..59d12f2ba 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -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))