| 1461 | } |
| 1462 | |
| 1463 | static struct delta_base_cache_entry * |
| 1464 | get_delta_base_cache_entry(struct packed_git *p, off_t base_offset) |
| 1465 | { |
| 1466 | struct hashmap_entry entry, *e; |
| 1467 | struct delta_base_cache_key key; |
| 1468 | |
| 1469 | if (!delta_base_cache.cmpfn) |
| 1470 | return NULL; |
| 1471 | |
| 1472 | hashmap_entry_init(&entry, pack_entry_hash(p, base_offset)); |
| 1473 | key.p = p; |
| 1474 | key.base_offset = base_offset; |
| 1475 | e = hashmap_get(&delta_base_cache, &entry, &key); |
| 1476 | return e ? container_of(e, struct delta_base_cache_entry, ent) : NULL; |
| 1477 | } |
| 1478 | |
| 1479 | static int delta_base_cache_key_eq(const struct delta_base_cache_key *a, |
| 1480 | const struct delta_base_cache_key *b) |
no test coverage detected