pathspec: convert find_pathspecs_matching_against_index to take an index

Convert find_pathspecs_matching_against_index to take an index
parameter.

In addition mark pathspec.c with NO_THE_INDEX_COMPATIBILITY_MACROS now
that it doesn't use any cache macros or reference 'the_index'.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Williams
2017-05-11 15:04:27 -07:00
committed by Junio C Hamano
parent 2249d4dbc1
commit 08de9151a8
4 changed files with 15 additions and 9 deletions

View File

@@ -96,7 +96,10 @@ static inline int ps_strcmp(const struct pathspec_item *item,
return strcmp(s1, s2);
}
extern char *find_pathspecs_matching_against_index(const struct pathspec *pathspec);
extern void add_pathspec_matches_against_index(const struct pathspec *pathspec, char *seen);
extern void add_pathspec_matches_against_index(const struct pathspec *pathspec,
const struct index_state *istate,
char *seen);
extern char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
const struct index_state *istate);
#endif /* PATHSPEC_H */