dir.c: remove an implicit dependency on the_index in pathspec code
Make the match_patchspec API and friends take an index_state instead of assuming the_index in dir.c. All external call sites are converted blindly to keep the patch simple and retain current behavior. Individual call sites may receive further updates to use the right index instead of the_index. 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
7f944e264e
commit
6d2df284e7
@ -748,7 +748,7 @@ static int do_reupdate(int ac, const char **av,
|
||||
int save_nr;
|
||||
char *path;
|
||||
|
||||
if (ce_stage(ce) || !ce_path_match(ce, &pathspec, NULL))
|
||||
if (ce_stage(ce) || !ce_path_match(&the_index, ce, &pathspec, NULL))
|
||||
continue;
|
||||
if (has_head)
|
||||
old = read_one_ent(NULL, &head_oid,
|
||||
|
Reference in New Issue
Block a user