Skip to content

Commit d7b665c

Browse files
pcloudsgitster
authored andcommitted
read-cache.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e675765 commit d7b665c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

read-cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate,
823823
ce->ce_namelen = len;
824824
ce->ce_mode = create_ce_mode(mode);
825825

826-
ret = refresh_cache_entry(&the_index, ce, refresh_options);
826+
ret = refresh_cache_entry(istate, ce, refresh_options);
827827
if (ret != ce)
828828
discard_cache_entry(ce);
829829
return ret;
@@ -1493,7 +1493,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
14931493
if (ignore_submodules && S_ISGITLINK(ce->ce_mode))
14941494
continue;
14951495

1496-
if (pathspec && !ce_path_match(&the_index, ce, pathspec, seen))
1496+
if (pathspec && !ce_path_match(istate, ce, pathspec, seen))
14971497
filtered = 1;
14981498

14991499
if (ce_stage(ce)) {

0 commit comments

Comments
 (0)