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

Function cache_or_unpack_entry

packfile.c:1520–1535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1518}
1519
1520static void *cache_or_unpack_entry(struct repository *r, struct packed_git *p,
1521 off_t base_offset, size_t *base_size,
1522 enum object_type *type)
1523{
1524 struct delta_base_cache_entry *ent;
1525
1526 ent = get_delta_base_cache_entry(p, base_offset);
1527 if (!ent)
1528 return unpack_entry(r, p, base_offset, type, base_size);
1529
1530 if (type)
1531 *type = ent->type;
1532 if (base_size)
1533 *base_size = ent->size;
1534 return xmemdupz(ent->data, ent->size);
1535}
1536
1537static inline void release_delta_base_cache(struct delta_base_cache_entry *ent)
1538{

Callers 1

Calls 3

unpack_entryFunction · 0.85
xmemdupzFunction · 0.85

Tested by

no test coverage detected