summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorKarsten Blees <karsten.blees@gmail.com>2013-11-14 20:22:27 +0100
committerJunio C Hamano <gitster@pobox.com>2013-11-18 13:04:24 -0800
commit419a597f6408d5b5cffe3e278258f58b47d15ad3 (patch)
tree511ee6ee942cb1c10a3cfb3030ec255ddbed2fb3 /read-cache.c
parent8b013788a14b96b8d20b1f6bc76a42f9733aefad (diff)
downloadgit-419a597f6408d5b5cffe3e278258f58b47d15ad3.tar.gz
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>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 33dd676ccb..00af9addd9 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -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);