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

Function fill_pack_entry

packfile.c:2121–2147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2119}
2120
2121static int fill_pack_entry(const struct object_id *oid,
2122 struct pack_entry *e,
2123 struct packed_git *p)
2124{
2125 off_t offset;
2126
2127 if (oidset_size(&p->bad_objects) &&
2128 oidset_contains(&p->bad_objects, oid))
2129 return 0;
2130
2131 offset = find_pack_entry_one(oid, p);
2132 if (!offset)
2133 return 0;
2134
2135 /*
2136 * We are about to tell the caller where they can locate the
2137 * requested object. We better make sure the packfile is
2138 * still here and can be accessed before supplying that
2139 * answer, as it may have been deleted since the index was
2140 * loaded!
2141 */
2142 if (!is_pack_valid(p))
2143 return 0;
2144 e->offset = offset;
2145 e->p = p;
2146 return 1;
2147}
2148
2149static int find_pack_entry(struct packfile_store *store,
2150 const struct object_id *oid,

Callers 2

find_pack_entryFunction · 0.70
has_object_kept_packFunction · 0.70

Calls 4

oidset_sizeFunction · 0.85
oidset_containsFunction · 0.85
find_pack_entry_oneFunction · 0.85
is_pack_validFunction · 0.85

Tested by

no test coverage detected