]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.c
pack-objects: mark file-local variable static
[thirdparty/git.git] / dir.c
diff --git a/dir.c b/dir.c
index d1e5e5e5bfaea81cb46fc3e3f57df31c6ef1eb2a..b2dfb69eb5606a7538cc5e1876a91f703ec4969c 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -360,7 +360,8 @@ int excluded_from_list(const char *pathname,
 
                        if (x->flags & EXC_FLAG_MUSTBEDIR) {
                                if (!dtype) {
-                                       if (!prefixcmp(pathname, exclude))
+                                       if (!prefixcmp(pathname, exclude) &&
+                                           pathname[x->patternlen] == '/')
                                                return to_exclude;
                                        else
                                                continue;