MCPcopy Index your code
hub / github.com/git/git / prefetch_cache_entries

Function prefetch_cache_entries

read-cache.c:3719–3739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3717}
3718
3719void prefetch_cache_entries(const struct index_state *istate,
3720 must_prefetch_predicate must_prefetch)
3721{
3722 int i;
3723 struct oid_array to_fetch = OID_ARRAY_INIT;
3724
3725 for (i = 0; i < istate->cache_nr; i++) {
3726 struct cache_entry *ce = istate->cache[i];
3727
3728 if (S_ISGITLINK(ce->ce_mode) || !must_prefetch(ce))
3729 continue;
3730 if (!odb_read_object_info_extended(the_repository->objects,
3731 &ce->oid, NULL,
3732 OBJECT_INFO_FOR_PREFETCH))
3733 continue;
3734 oid_array_append(&to_fetch, &ce->oid);
3735 }
3736 promisor_remote_get_direct(the_repository,
3737 to_fetch.oid, to_fetch.nr);
3738 oid_array_clear(&to_fetch);
3739}
3740
3741static int read_one_entry_opt(struct index_state *istate,
3742 const struct object_id *oid,

Callers 2

cache_tree_updateFunction · 0.85
check_updatesFunction · 0.85

Calls 4

oid_array_appendFunction · 0.85
oid_array_clearFunction · 0.85

Tested by

no test coverage detected