summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--name-hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/name-hash.c b/name-hash.c
index 6d9f23e932..3f7722a63b 100644
--- a/name-hash.c
+++ b/name-hash.c
@@ -120,7 +120,8 @@ static void lazy_init_name_hash(struct index_state *istate)
return;
hashmap_init(&istate->name_hash, (hashmap_cmp_fn) cache_entry_cmp,
istate->cache_nr);
- hashmap_init(&istate->dir_hash, (hashmap_cmp_fn) dir_entry_cmp, 0);
+ hashmap_init(&istate->dir_hash, (hashmap_cmp_fn) dir_entry_cmp,
+ istate->cache_nr);
for (nr = 0; nr < istate->cache_nr; nr++)
hash_index_entry(istate, istate->cache[nr]);
istate->name_hash_initialized = 1;