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

Function find_cached_object_pos

pack-bitmap-write.c:255–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255static int find_cached_object_pos(struct bitmap_writer *writer,
256 const struct object_id *oid, uint32_t *pos)
257{
258 size_t slot = bitmap_writer_pos_cache_slot(writer, oid);
259
260 if (bitmap_writer_pos_cache_valid(writer, slot) &&
261 oideq(&writer->pos_cache[slot].oid, oid)) {
262 writer->pos_cache_hits++;
263 *pos = writer->pos_cache[slot].pos & ~BITMAP_POS_CACHE_VALID;
264 return 1;
265 }
266
267 writer->pos_cache_misses++;
268 return 0;
269}
270
271static uint32_t store_cached_object_pos(struct bitmap_writer *writer,
272 const struct object_id *oid,

Callers 1

find_object_posFunction · 0.85

Calls 3

oideqFunction · 0.85

Tested by

no test coverage detected