| 74 | } |
| 75 | |
| 76 | char *find_pathspecs_matching_skip_worktree(const struct pathspec *pathspec) |
| 77 | { |
| 78 | struct index_state *istate = the_repository->index; |
| 79 | char *seen = xcalloc(pathspec->nr, 1); |
| 80 | unsigned int i; |
| 81 | |
| 82 | for (i = 0; i < istate->cache_nr; i++) { |
| 83 | struct cache_entry *ce = istate->cache[i]; |
| 84 | if (ce_skip_worktree(ce) || !path_in_sparse_checkout(ce->name, istate)) |
| 85 | ce_path_match(istate, ce, pathspec, seen); |
| 86 | } |
| 87 | |
| 88 | return seen; |
| 89 | } |
| 90 | |
| 91 | /* |
| 92 | * Magic pathspec |
no test coverage detected