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

Function store_cached_object_pos

pack-bitmap-write.c:271–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static uint32_t store_cached_object_pos(struct bitmap_writer *writer,
272 const struct object_id *oid,
273 uint32_t pos)
274{
275 size_t slot;
276
277 if (pos & BITMAP_POS_CACHE_VALID)
278 return pos; /* too large to cache */
279
280 slot = bitmap_writer_pos_cache_slot(writer, oid);
281
282 oidcpy(&writer->pos_cache[slot].oid, oid);
283 writer->pos_cache[slot].pos = pos | BITMAP_POS_CACHE_VALID;
284
285 return pos;
286}
287
288static uint32_t find_object_pos(struct bitmap_writer *writer,
289 const struct object_id *oid, int *found)

Callers 1

find_object_posFunction · 0.85

Calls 2

oidcpyFunction · 0.85

Tested by

no test coverage detected