Merge branch 'am/sparse-index-name-hash-fix'
Avoid adding directory path to a sparse-index tree entries to the name-hash, since they would bloat the hashtable without anybody querying for them. This was done already for a single threaded part of the code, but now the multi-threaded code also does the same. * am/sparse-index-name-hash-fix: name-hash: don't add sparse directories in threaded lazy init
This commit is contained in:
@@ -492,9 +492,11 @@ static void *lazy_name_thread_proc(void *_data)
|
||||
for (k = 0; k < d->istate->cache_nr; k++) {
|
||||
struct cache_entry *ce_k = d->istate->cache[k];
|
||||
ce_k->ce_flags |= CE_HASHED;
|
||||
if (!S_ISSPARSEDIR(ce_k->ce_mode)) {
|
||||
hashmap_entry_init(&ce_k->ent, d->lazy_entries[k].hash_name);
|
||||
hashmap_add(&d->istate->name_hash, &ce_k->ent);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user