| 3503 | } |
| 3504 | |
| 3505 | struct cache_entry *dup_cache_entry(const struct cache_entry *ce, |
| 3506 | struct index_state *istate) |
| 3507 | { |
| 3508 | unsigned int size = ce_size(ce); |
| 3509 | int mem_pool_allocated; |
| 3510 | struct cache_entry *new_entry = make_empty_cache_entry(istate, ce_namelen(ce)); |
| 3511 | mem_pool_allocated = new_entry->mem_pool_allocated; |
| 3512 | |
| 3513 | memcpy(new_entry, ce, size); |
| 3514 | new_entry->mem_pool_allocated = mem_pool_allocated; |
| 3515 | return new_entry; |
| 3516 | } |
| 3517 | |
| 3518 | void discard_cache_entry(struct cache_entry *ce) |
| 3519 | { |
no test coverage detected