| 448 | } |
| 449 | |
| 450 | static 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 | |
| 471 | static int default_refs; |
| 472 |
nothing calls this directly
no test coverage detected