Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Make core.sharedRepository work under cygwin 1.7
[gitweb.git]
/
name-hash.c
diff --git
a/name-hash.c
b/name-hash.c
index 942c45962252eba4c6f88b4f4f7593c9247749ae..9bac31a6ab7aa80586828e7f48ab829e5b77a740 100644
(file)
--- a/
name-hash.c
+++ b/
name-hash.c
@@
-92,6
+92,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;