diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-03 08:44:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-03 08:44:54 -0700 |
commit | c81e2c61b387b7fc3ef8c303f0f8ac76411b465d (patch) | |
tree | 467ff68da0dd25f5055649139e5dd393c90c21ff /cache.h | |
parent | 64379806a9adaeaaa7971b7f8411105987ea6d42 (diff) | |
parent | 2092678cd5265e40dfb2b8e3adc8f2075faeece4 (diff) | |
download | git-c81e2c61b387b7fc3ef8c303f0f8ac76411b465d.tar.gz git-c81e2c61b387b7fc3ef8c303f0f8ac76411b465d.tar.xz |
Merge branch 'kb/name-hash' into maint-1.8.1
* kb/name-hash:
name-hash.c: fix endless loop with core.ignorecase=true
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -131,7 +131,6 @@ struct cache_entry { unsigned int ce_namelen; unsigned char sha1[20]; struct cache_entry *next; - struct cache_entry *dir_next; char name[FLEX_ARRAY]; /* more */ }; @@ -267,25 +266,15 @@ struct index_state { unsigned name_hash_initialized : 1, initialized : 1; struct hash_table name_hash; + struct hash_table dir_hash; }; extern struct index_state the_index; /* Name hashing */ extern void add_name_hash(struct index_state *istate, struct cache_entry *ce); -/* - * We don't actually *remove* it, we can just mark it invalid so that - * we won't find it in lookups. - * - * Not only would we have to search the lists (simple enough), but - * we'd also have to rehash other hash buckets in case this makes the - * hash bucket empty (common). So it's much better to just mark - * it. - */ -static inline void remove_name_hash(struct cache_entry *ce) -{ - ce->ce_flags |= CE_UNHASHED; -} +extern void remove_name_hash(struct index_state *istate, struct cache_entry *ce); +extern void free_name_hash(struct index_state *istate); #ifndef NO_THE_INDEX_COMPATIBILITY_MACROS |