MCPcopy Create free account
hub / github.com/git/git / midx_for_pack

Function midx_for_pack

midx.c:437–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437static uint32_t midx_for_pack(struct multi_pack_index **_m,
438 uint32_t pack_int_id)
439{
440 struct multi_pack_index *m = *_m;
441 while (m && pack_int_id < m->num_packs_in_base)
442 m = m->base_midx;
443
444 if (!m)
445 BUG("NULL multi-pack-index for pack ID: %"PRIu32, pack_int_id);
446
447 if (pack_int_id >= m->num_packs + m->num_packs_in_base)
448 die(_("bad pack-int-id: %u (%u total packs)"),
449 pack_int_id, m->num_packs + m->num_packs_in_base);
450
451 *_m = m;
452
453 return pack_int_id - m->num_packs_in_base;
454}
455
456int prepare_midx_pack(struct multi_pack_index *m,
457 uint32_t pack_int_id)

Callers 3

prepare_midx_packFunction · 0.85
nth_midxed_packFunction · 0.85
nth_bitmapped_packFunction · 0.85

Calls 1

dieFunction · 0.70

Tested by

no test coverage detected