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

Function added_object

builtin/unpack-objects.c:332–350  ·  view source on GitHub ↗

* We now know the contents of an object (which is nr-th in the pack); * resolve all the deltified objects that are based on it. */

Source from the content-addressed store, hash-verified

330 * resolve all the deltified objects that are based on it.
331 */
332static void added_object(unsigned nr, enum object_type type,
333 void *data, unsigned long size)
334{
335 struct delta_info **p = &delta_list;
336 struct delta_info *info;
337
338 while ((info = *p) != NULL) {
339 if (oideq(&info->base_oid, &obj_list[nr].oid) ||
340 info->base_offset == obj_list[nr].offset) {
341 *p = info->next;
342 p = &delta_list;
343 resolve_delta(info->nr, type, data, size,
344 info->delta, info->size);
345 free(info);
346 continue;
347 }
348 p = &info->next;
349 }
350}
351
352static void unpack_non_delta_entry(enum object_type type, unsigned long size,
353 unsigned nr)

Callers 1

write_objectFunction · 0.85

Calls 2

oideqFunction · 0.85
resolve_deltaFunction · 0.70

Tested by

no test coverage detected