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

Function bitmap_writer_init_pos_cache

pack-bitmap-write.c:229–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227#define BITMAP_POS_CACHE_VALID (1U << 31)
228
229static void bitmap_writer_init_pos_cache(struct bitmap_writer *writer)
230{
231 if (writer->pos_cache)
232 return;
233
234 writer->pos_cache_nr = BITMAP_POS_MIN_CACHE_SIZE;
235
236 while (writer->pos_cache_nr < writer->to_pack->nr_objects &&
237 writer->pos_cache_nr < BITMAP_POS_MAX_CACHE_SIZE)
238 writer->pos_cache_nr <<= 1;
239
240 CALLOC_ARRAY(writer->pos_cache, writer->pos_cache_nr);
241}
242
243static size_t bitmap_writer_pos_cache_slot(struct bitmap_writer *writer,
244 const struct object_id *oid)

Callers 1

find_object_posFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected