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

Function diff_queued_diff_prefetch

diff.c:7451–7474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7449}
7450
7451void diff_queued_diff_prefetch(void *repository)
7452{
7453 struct repository *repo = repository;
7454 int i;
7455 struct diff_queue_struct *q = &diff_queued_diff;
7456 struct oid_array to_fetch = OID_ARRAY_INIT;
7457
7458 for (i = 0; i < q->nr; i++) {
7459 struct diff_filepair *p = q->queue[i];
7460
7461 if (!p)
7462 continue;
7463
7464 diff_add_if_missing(repo, &to_fetch, p->one);
7465 diff_add_if_missing(repo, &to_fetch, p->two);
7466 }
7467
7468 /*
7469 * NEEDSWORK: Consider deduplicating the OIDs sent.
7470 */
7471 promisor_remote_get_direct(repo, to_fetch.oid, to_fetch.nr);
7472
7473 oid_array_clear(&to_fetch);
7474}
7475
7476void init_diffstat_widths(struct diff_options *options)
7477{

Callers 1

diffcore_stdFunction · 0.85

Calls 3

diff_add_if_missingFunction · 0.85
oid_array_clearFunction · 0.85

Tested by

no test coverage detected