Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'diff-tree.c')
-rw-r--r--diff-tree.c5
1 files changed, 5 insertions, 0 deletions
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;