[v3,09/23] read-cache.c: remove implicit dependency on the_index
diff mbox series

Message ID 20180909085418.31531-10-pclouds@gmail.com
State New
Headers show
Series
  • [v3,01/23] archive.c: remove implicit dependency the_repository
Related show

Commit Message

Duy Nguyen Sept. 9, 2018, 8:54 a.m. UTC
---
 read-cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

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)) {