Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--name-hash.c7
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);