Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pathspec.c b/pathspec.c
index 6d502e64e5..8247a65ec8 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -62,6 +62,21 @@ char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
return seen;
}
+char *find_pathspecs_matching_skip_worktree(const struct pathspec *pathspec)
+{
+ struct index_state *istate = the_repository->index;
+ char *seen = xcalloc(pathspec->nr, 1);
+ int i;
+
+ for (i = 0; i < istate->cache_nr; i++) {
+ struct cache_entry *ce = istate->cache[i];
+ if (ce_skip_worktree(ce))
+ ce_path_match(istate, ce, pathspec, seen);
+ }
+
+ return seen;
+}
+
/*
* Magic pathspec
*