summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 42793e582f..65f54b606f 100644
--- a/dir.h
+++ b/dir.h
@@ -212,4 +212,11 @@ static inline int ce_path_match(const struct cache_entry *ce,
return match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, seen);
}
+static inline int dir_path_match(const struct dir_entry *ent,
+ const struct pathspec *pathspec,
+ int prefix, char *seen)
+{
+ return match_pathspec_depth(pathspec, ent->name, ent->len, prefix, seen);
+}
+
#endif