diff options
Diffstat (limited to 'name-hash.c')
-rw-r--r-- | name-hash.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/name-hash.c b/name-hash.c index 4e03fac9bb..d08deaa2c9 100644 --- a/name-hash.c +++ b/name-hash.c @@ -109,8 +109,11 @@ static void hash_index_entry(struct index_state *istate, struct cache_entry *ce) if (ce->ce_flags & CE_HASHED) return; ce->ce_flags |= CE_HASHED; - hashmap_entry_init(&ce->ent, memihash(ce->name, ce_namelen(ce))); - hashmap_add(&istate->name_hash, &ce->ent); + + if (!S_ISSPARSEDIR(ce->ce_mode)) { + hashmap_entry_init(&ce->ent, memihash(ce->name, ce_namelen(ce))); + hashmap_add(&istate->name_hash, &ce->ent); + } if (ignore_case) add_dir_entry(istate, ce); |