diff options
author | Jameson Miller <jamill@microsoft.com> | 2018-07-02 22:49:29 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 20:58:15 +0300 |
commit | 768d7965068189ec5287ac53b4b55bfd443bb456 (patch) | |
tree | d7e6fc5e2e8fd15d3207c7155965bcc1f12a1fac /read-cache.c | |
parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) |
read-cache: teach refresh_cache_entry to take istate
Refactor refresh_cache_entry() to work on a specific index, instead of
implicitly using the_index. This is in preparation for making the
make_cache_entry function apply to a specific index.
Signed-off-by: Jameson Miller <jamill@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/read-cache.c b/read-cache.c index 372588260e..fa8366ecab 100644 --- a/read-cache.c +++ b/read-cache.c @@ -767,7 +767,7 @@ struct cache_entry *make_cache_entry(unsigned int mode, ce->ce_namelen = len; ce->ce_mode = create_ce_mode(mode); - ret = refresh_cache_entry(ce, refresh_options); + ret = refresh_cache_entry(&the_index, ce, refresh_options); if (ret != ce) free(ce); return ret; @@ -1473,10 +1473,11 @@ int refresh_index(struct index_state *istate, unsigned int flags, return has_errors; } -struct cache_entry *refresh_cache_entry(struct cache_entry *ce, - unsigned int options) +struct cache_entry *refresh_cache_entry(struct index_state *istate, + struct cache_entry *ce, + unsigned int options) { - return refresh_cache_ent(&the_index, ce, options, NULL, NULL); + return refresh_cache_ent(istate, ce, options, NULL, NULL); } |