read-cache.c: remove implicit dependency on the_index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Sep 21, 2018 at 17:57 UTC d7b665c3635d56f30ff7418ef42d863ff422d1ae
1 file changed +2 -2
read-cache.c
+2 -2
@@ -823,7 +823,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate,
823 ce->ce_namelen = len;
824 ce->ce_mode = create_ce_mode(mode);
825
826 - ret = refresh_cache_entry(&the_index, ce, refresh_options);
826 + ret = refresh_cache_entry(istate, ce, refresh_options);
827 if (ret != ce)
828 discard_cache_entry(ce);
829 return ret;
@@ -1493,7 +1493,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
1493 if (ignore_submodules && S_ISGITLINK(ce->ce_mode))
1494 continue;
1495
1496 - if (pathspec && !ce_path_match(&the_index, ce, pathspec, seen))
1496 + if (pathspec && !ce_path_match(istate, ce, pathspec, seen))
1497 filtered = 1;
1498
1499 if (ce_stage(ce)) {