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

Function bitmap_name_hash

pack-bitmap.c:216–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216static uint32_t bitmap_name_hash(struct bitmap_index *index, uint32_t pos)
217{
218 if (bitmap_is_midx(index)) {
219 while (index && pos < index->midx->num_objects_in_base) {
220 ASSERT(bitmap_is_midx(index));
221 index = index->base;
222 }
223
224 if (!index)
225 BUG("NULL base bitmap for object position: %"PRIu32, pos);
226
227 pos -= index->midx->num_objects_in_base;
228 if (pos >= index->midx->num_objects)
229 BUG("out-of-bounds midx bitmap object at %"PRIu32, pos);
230 }
231
232 if (!index->hashes)
233 return 0;
234
235 return get_be32(index->hashes + pos);
236}
237
238static struct repository *bitmap_repo(struct bitmap_index *bitmap_git)
239{

Callers 2

show_objects_for_typeFunction · 0.85
create_bitmap_mappingFunction · 0.85

Calls 2

bitmap_is_midxFunction · 0.85
get_be32Function · 0.85

Tested by

no test coverage detected