diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-08-02 14:06:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-02 14:06:42 -0700 |
commit | 8230107f336b29d25111c517639b8cd5717c8416 (patch) | |
tree | b24d756b13a4877290c6369d9833d8e6e8f28120 /cache.h | |
parent | Merge branch 'fc/pull-no-rebase-merges-theirs-into-ours' (diff) | |
parent | cache-tree: prefetch in partial clone read-tree (diff) | |
download | tgif-8230107f336b29d25111c517639b8cd5717c8416.tar.xz |
Merge branch 'jt/bulk-prefetch'
"git read-tree" had a codepath where blobs are fetched one-by-one
from the promisor remote, which has been corrected to fetch in bulk.
* jt/bulk-prefetch:
cache-tree: prefetch in partial clone read-tree
unpack-trees: refactor prefetching code
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -410,6 +410,15 @@ struct cache_entry *dup_cache_entry(const struct cache_entry *ce, struct index_s */ void validate_cache_entries(const struct index_state *istate); +/* + * Bulk prefetch all missing cache entries that are not GITLINKs and that match + * the given predicate. This function should only be called if + * has_promisor_remote() returns true. + */ +typedef int (*must_prefetch_predicate)(const struct cache_entry *); +void prefetch_cache_entries(const struct index_state *istate, + must_prefetch_predicate must_prefetch); + #ifdef USE_THE_INDEX_COMPATIBILITY_MACROS extern struct index_state the_index; |