MCPcopy Create free account
hub / github.com/git/git / get_pack_fanout

Function get_pack_fanout

packfile.c:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287uint32_t get_pack_fanout(struct packed_git *p, uint32_t value)
288{
289 const uint32_t *level1_ofs = p->index_data;
290
291 if (!level1_ofs) {
292 if (open_pack_index(p))
293 return 0;
294 level1_ofs = p->index_data;
295 }
296
297 if (p->index_version > 1) {
298 level1_ofs += 2;
299 }
300
301 return ntohl(level1_ofs[value]);
302}
303
304static struct packed_git *alloc_packed_git(struct repository *r, int extra)
305{

Callers 1

Calls 1

open_pack_indexFunction · 0.85

Tested by

no test coverage detected