MCPcopy Create free account
hub / github.com/git/git / dup_cache_entry

Function dup_cache_entry

read-cache.c:3505–3516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3503}
3504
3505struct 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
3518void discard_cache_entry(struct cache_entry *ce)
3519{

Callers 2

add_entryFunction · 0.85
merged_entryFunction · 0.85

Calls 1

make_empty_cache_entryFunction · 0.85

Tested by

no test coverage detected