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

Function nth_midxed_object_oid

midx.c:547–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547struct object_id *nth_midxed_object_oid(struct object_id *oid,
548 struct multi_pack_index *m,
549 uint32_t n)
550{
551 if (n >= m->num_objects + m->num_objects_in_base)
552 return NULL;
553
554 n = midx_for_object(&m, n);
555
556 oidread(oid, m->chunk_oid_lookup + st_mult(m->hash_len, n),
557 m->source->odb->repo->hash_algo);
558 return oid;
559}
560
561off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
562{

Callers 9

nth_bitmap_object_oidFunction · 0.85
show_objects_for_typeFunction · 0.85
get_disk_usage_for_typeFunction · 0.85
find_abbrev_len_for_midxFunction · 0.85
verify_midx_fileFunction · 0.85
midx_repackFunction · 0.85
read_midx_fileFunction · 0.85

Calls 3

midx_for_objectFunction · 0.85
oidreadFunction · 0.85
st_multFunction · 0.85

Tested by 1

read_midx_fileFunction · 0.68