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:

committed by
Junio C Hamano

parent
2249d4dbc1
commit
08de9151a8
@ -136,7 +136,7 @@ static char *prune_directory(struct dir_struct *dir, struct pathspec *pathspec,
|
||||
*dst++ = entry;
|
||||
}
|
||||
dir->nr = dst - dir->entries;
|
||||
add_pathspec_matches_against_index(pathspec, seen);
|
||||
add_pathspec_matches_against_index(pathspec, &the_index, seen);
|
||||
return seen;
|
||||
}
|
||||
|
||||
@ -418,7 +418,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
int i;
|
||||
|
||||
if (!seen)
|
||||
seen = find_pathspecs_matching_against_index(&pathspec);
|
||||
seen = find_pathspecs_matching_against_index(&pathspec, &the_index);
|
||||
|
||||
/*
|
||||
* file_exists() assumes exact match
|
||||
|
Reference in New Issue
Block a user