From: Nguyễn Thái Ngọc Duy Date: Fri, 21 Sep 2018 15:57:25 +0000 (+0200) Subject: read-cache.c: remove implicit dependency on the_index X-Git-Tag: v2.20.0-rc0~164^2~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d7b665c3635d56f30ff7418ef42d863ff422d1ae?hp=e675765235001c382ba30d336bb69618296c012b read-cache.c: remove implicit dependency on the_index Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/read-cache.c b/read-cache.c index 6f772b2885..563500fe98 100644 --- a/read-cache.c +++ b/read-cache.c @@ -823,7 +823,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate, ce->ce_namelen = len; ce->ce_mode = create_ce_mode(mode); - ret = refresh_cache_entry(&the_index, ce, refresh_options); + ret = refresh_cache_entry(istate, ce, refresh_options); if (ret != ce) discard_cache_entry(ce); return ret; @@ -1493,7 +1493,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, if (ignore_submodules && S_ISGITLINK(ce->ce_mode)) continue; - if (pathspec && !ce_path_match(&the_index, ce, pathspec, seen)) + if (pathspec && !ce_path_match(istate, ce, pathspec, seen)) filtered = 1; if (ce_stage(ce)) {