name-hash.c: remove cache entries instead of marking them CE_UNHASHED
The new hashmap implementation supports remove, so really remove unused cache entries from the name hashmap instead of just marking them. The CE_UNHASHED flag and CE_STATE_MASK are no longer needed. Keep the CE_HASHED flag to prevent adding entries twice. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
8b013788a1
commit
419a597f64
@ -58,7 +58,7 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
|
||||
|
||||
new = xmalloc(cache_entry_size(namelen));
|
||||
copy_cache_entry(new, old);
|
||||
new->ce_flags &= ~CE_STATE_MASK;
|
||||
new->ce_flags &= ~CE_HASHED;
|
||||
new->ce_namelen = namelen;
|
||||
memcpy(new->name, new_name, namelen + 1);
|
||||
|
||||
|
Reference in New Issue
Block a user