X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=tree.c;h=5ab90af256a664366f3f92b467f52634c0df3f79;hb=6f53c3b21e3899716caccc2f88a1186ca7fa0f60;hp=0d703a0c473e65c60d9e130b4e1fd50b79e9462b;hpb=07fb030efc7fd3d1833b53880dd39e98033326f6;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;