Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'da/darwin'
[gitweb.git]
/
name-hash.c
diff --git
a/name-hash.c
b/name-hash.c
index 6d7e1980c62f96fc3614ddd130ce25a765fceae5..617c86c53762575373d0bcbf3d8bab09cb042caa 100644
(file)
--- a/
name-hash.c
+++ b/
name-hash.c
@@
-150,6
+150,8
@@
static void lazy_init_name_hash(struct index_state *istate)
if (istate->name_hash_initialized)
return;
+ if (istate->cache_nr)
+ preallocate_hash(&istate->name_hash, istate->cache_nr);
for (nr = 0; nr < istate->cache_nr; nr++)
hash_index_entry(istate, istate->cache[nr]);
istate->name_hash_initialized = 1;