X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tree.c;h=5ab90af256a664366f3f92b467f52634c0df3f79;hb=b6b0737d02e3bb9b3015ec66f5b6454d5b83d57b;hp=0d703a0c473e65c60d9e130b4e1fd50b79e9462b;hpb=84047e0f2847351ac84bd263a727c0e2d5002b2d;p=git.git diff --git a/tree.c b/tree.c index 0d703a0c4..5ab90af25 100644 --- a/tree.c +++ b/tree.c @@ -62,6 +62,7 @@ static int match_tree_entry(const char *base, int baselen, const char *path, uns continue; /* pathspecs match only at the directory boundaries */ if (!matchlen || + baselen == matchlen || base[matchlen] == '/' || match[matchlen - 1] == '/') return 1;