]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.h
pathspec: convert some match_pathspec_depth() to ce_path_match()
[thirdparty/git.git] / dir.h
diff --git a/dir.h b/dir.h
index 9b7e4e77d8b11bab92a91a6ce3e8920e50d23f9b..42793e582ffc8b17da2499ec06b3495de040042f 100644 (file)
--- a/dir.h
+++ b/dir.h
@@ -205,4 +205,11 @@ extern int git_fnmatch(const struct pathspec_item *item,
                       const char *pattern, const char *string,
                       int prefix);
 
+static inline int ce_path_match(const struct cache_entry *ce,
+                               const struct pathspec *pathspec,
+                               char *seen)
+{
+       return match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, seen);
+}
+
 #endif