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

Function oe_set_in_pack

pack-objects.h:291–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289void oe_map_new_pack(struct packing_data *pack);
290
291static inline void oe_set_in_pack(struct packing_data *pack,
292 struct object_entry *e,
293 struct packed_git *p)
294{
295 if (pack->in_pack_by_idx) {
296 if (p->index) {
297 e->in_pack_idx = p->index;
298 return;
299 }
300 /*
301 * We're accessing packs by index, but this pack doesn't have
302 * an index (e.g., because it was added since we created the
303 * in_pack_by_idx array). Bail to oe_map_new_pack(), which
304 * will convert us to using the full in_pack array, and then
305 * fall through to our in_pack handling.
306 */
307 oe_map_new_pack(pack);
308 }
309 pack->in_pack[e - pack->objects] = p;
310}
311
312void oe_set_delta_ext(struct packing_data *pack,
313 struct object_entry *e,

Callers 3

add_packed_objectFunction · 0.85
create_object_entryFunction · 0.85

Calls 1

oe_map_new_packFunction · 0.85

Tested by 1

add_packed_objectFunction · 0.68