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 /read-cache.c | |
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 'read-cache.c')
-rw-r--r-- | read-cache.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/read-cache.c b/read-cache.c index 5cddbc325..b4d08254d 100644 --- a/read-cache.c +++ b/read-cache.c @@ -46,7 +46,7 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache { struct cache_entry *old = istate->cache[nr]; - remove_name_hash(old); + remove_name_hash(istate, old); set_index_entry(istate, nr, ce); istate->cache_changed = 1; } @@ -456,7 +456,7 @@ int remove_index_entry_at(struct index_state *istate, int pos) struct cache_entry *ce = istate->cache[pos]; record_resolve_undo(istate, ce); - remove_name_hash(ce); + remove_name_hash(istate, ce); istate->cache_changed = 1; istate->cache_nr--; if (pos >= istate->cache_nr) @@ -479,7 +479,7 @@ void remove_marked_cache_entries(struct index_state *istate) for (i = j = 0; i < istate->cache_nr; i++) { if (ce_array[i]->ce_flags & CE_REMOVE) - remove_name_hash(ce_array[i]); + remove_name_hash(istate, ce_array[i]); else ce_array[j++] = ce_array[i]; } @@ -1511,8 +1511,7 @@ int discard_index(struct index_state *istate) istate->cache_changed = 0; istate->timestamp.sec = 0; istate->timestamp.nsec = 0; - istate->name_hash_initialized = 0; - free_hash(&istate->name_hash); + free_name_hash(istate); cache_tree_free(&(istate->cache_tree)); istate->initialized = 0; |