| 39 | } |
| 40 | |
| 41 | static int add_packed_object(const struct object_id *oid, |
| 42 | struct packed_git *pack, |
| 43 | uint32_t pos, |
| 44 | void *_data) |
| 45 | { |
| 46 | struct packing_data *packed = _data; |
| 47 | struct object_entry *entry; |
| 48 | struct object_info oi = OBJECT_INFO_INIT; |
| 49 | enum object_type type; |
| 50 | |
| 51 | oi.typep = &type; |
| 52 | |
| 53 | entry = packlist_alloc(packed, oid); |
| 54 | entry->idx.offset = nth_packed_object_offset(pack, pos); |
| 55 | if (packed_object_info(pack, entry->idx.offset, &oi) < 0) |
| 56 | die("could not get type of object %s", |
| 57 | oid_to_hex(oid)); |
| 58 | oe_set_type(entry, type); |
| 59 | oe_set_in_pack(packed, entry, pack); |
| 60 | |
| 61 | return 0; |
| 62 | } |
| 63 | |
| 64 | static int idx_oid_cmp(const void *va, const void *vb) |
| 65 | { |
nothing calls this directly
no test coverage detected