summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorKarsten Blees <karsten.blees@gmail.com>2013-11-14 19:22:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-11-18 21:04:24 (GMT)
commit419a597f6408d5b5cffe3e278258f58b47d15ad3 (patch)
tree511ee6ee942cb1c10a3cfb3030ec255ddbed2fb3 /read-cache.c
parent8b013788a14b96b8d20b1f6bc76a42f9733aefad (diff)
downloadgit-419a597f6408d5b5cffe3e278258f58b47d15ad3.zip
git-419a597f6408d5b5cffe3e278258f58b47d15ad3.tar.gz
git-419a597f6408d5b5cffe3e278258f58b47d15ad3.tar.bz2
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 33dd676..00af9ad 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);