| 503 | } |
| 504 | |
| 505 | static struct object_entry *insert_object(struct object_id *oid) |
| 506 | { |
| 507 | struct object_entry *e; |
| 508 | unsigned int hash = oidhash(oid); |
| 509 | |
| 510 | e = hashmap_get_entry_from_hash(&object_table, hash, oid, |
| 511 | struct object_entry, ent); |
| 512 | if (!e) { |
| 513 | e = new_object(oid); |
| 514 | e->idx.offset = 0; |
| 515 | hashmap_entry_init(&e->ent, hash); |
| 516 | hashmap_add(&object_table, &e->ent); |
| 517 | } |
| 518 | |
| 519 | return e; |
| 520 | } |
| 521 | |
| 522 | static void invalidate_pack_id(unsigned int id) |
| 523 | { |
no test coverage detected