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

Function fsck_obj_buffer

builtin/fsck.c:450–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450static int fsck_obj_buffer(const struct object_id *oid, enum object_type type,
451 unsigned long size, void *buffer, int *eaten, void *cb_data)
452{
453 struct repository *repo = cb_data;
454 struct object *obj;
455
456 /*
457 * Note, buffer may be NULL if type is OBJ_BLOB. See
458 * verify_packfile(), data_valid variable for details.
459 */
460 obj = parse_object_buffer(repo, oid, type, size, buffer, eaten);
461 if (!obj) {
462 errors_found |= ERROR_OBJECT;
463 return error(_("%s: object corrupt or missing"),
464 oid_to_hex(oid));
465 }
466 obj->flags &= ~(REACHABLE | SEEN);
467 obj->flags |= HAS_OBJ;
468 return fsck_obj(repo, obj, buffer, size);
469}
470
471static int default_refs;
472

Callers

nothing calls this directly

Calls 4

parse_object_bufferFunction · 0.85
errorFunction · 0.85
oid_to_hexFunction · 0.85
fsck_objFunction · 0.85

Tested by

no test coverage detected