summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:48:10 (GMT)
commitd7b665c3635d56f30ff7418ef42d863ff422d1ae (patch)
treec0c535918fae7172935cac42788ad5439654d78d /read-cache.c
parente675765235001c382ba30d336bb69618296c012b (diff)
downloadgit-d7b665c3635d56f30ff7418ef42d863ff422d1ae.zip
git-d7b665c3635d56f30ff7418ef42d863ff422d1ae.tar.gz
git-d7b665c3635d56f30ff7418ef42d863ff422d1ae.tar.bz2
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>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 6f772b2..563500f 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)) {