convert refresh_index to take struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
17ddc66e70
commit
9b2d61499b
@ -1114,7 +1114,8 @@ static void show_file(const char * fmt, const char * name, int in_porcelain,
|
||||
printf(fmt, name);
|
||||
}
|
||||
|
||||
int refresh_index(struct index_state *istate, unsigned int flags, const char **pathspec,
|
||||
int refresh_index(struct index_state *istate, unsigned int flags,
|
||||
const struct pathspec *pathspec,
|
||||
char *seen, const char *header_msg)
|
||||
{
|
||||
int i;
|
||||
@ -1149,7 +1150,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
|
||||
continue;
|
||||
|
||||
if (pathspec &&
|
||||
!match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen))
|
||||
!match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, seen))
|
||||
filtered = 1;
|
||||
|
||||
if (ce_stage(ce)) {
|
||||
|
||||
Reference in New Issue
Block a user