| 730 | } |
| 731 | |
| 732 | int odb_pretend_object(struct object_database *odb, |
| 733 | void *buf, size_t len, enum object_type type, |
| 734 | struct object_id *oid) |
| 735 | { |
| 736 | hash_object_file(odb->repo->hash_algo, buf, len, type, oid); |
| 737 | if (odb_has_object(odb, oid, 0)) |
| 738 | return 0; |
| 739 | |
| 740 | return odb_source_write_object(odb->inmemory_objects, |
| 741 | buf, len, type, oid, NULL, 0); |
| 742 | } |
| 743 | |
| 744 | void *odb_read_object(struct object_database *odb, |
| 745 | const struct object_id *oid, |
no test coverage detected