summaryrefslogtreecommitdiff
path: root/pathspec.h
diff options
context:
space:
mode:
Diffstat (limited to 'pathspec.h')
-rw-r--r--pathspec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/pathspec.h b/pathspec.h
index 0feb8e9..5b4c661 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -160,6 +160,14 @@ void add_pathspec_matches_against_index(const struct pathspec *pathspec,
char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
const struct index_state *istate,
enum ps_skip_worktree_action sw_action);
+char *find_pathspecs_matching_skip_worktree(const struct pathspec *pathspec);
+static inline int matches_skip_worktree(const struct pathspec *pathspec,
+ int item, char **seen_ptr)
+{
+ if (!*seen_ptr)
+ *seen_ptr = find_pathspecs_matching_skip_worktree(pathspec);
+ return (*seen_ptr)[item];
+}
int match_pathspec_attrs(const struct index_state *istate,
const char *name, int namelen,
const struct pathspec_item *item);