| 3717 | } |
| 3718 | |
| 3719 | void 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 | |
| 3741 | static int read_one_entry_opt(struct index_state *istate, |
| 3742 | const struct object_id *oid, |
no test coverage detected