struct thread_data *p = _data;
struct index_state *index = p->index;
struct cache_entry **cep = index->cache + p->offset;
+ struct cache_def cache;
+ memset(&cache, 0, sizeof(cache));
nr = p->nr;
if (nr + p->offset > index->cache_nr)
nr = index->cache_nr - p->offset;
continue;
if (!ce_path_match(ce, p->pathspec))
continue;
+ if (threaded_has_symlink_leading_path(&cache, ce->name, ce_namelen(ce)))
+ continue;
if (lstat(ce->name, &st))
continue;
if (ie_match_stat(index, ce, &st, CE_MATCH_RACY_IS_DIRTY))
if (threads > MAX_PARALLEL)
threads = MAX_PARALLEL;
offset = 0;
- work = (index->cache_nr + threads - 1) / threads;
+ work = DIV_ROUND_UP(index->cache_nr, threads);
for (i = 0; i < threads; i++) {
struct thread_data *p = data+i;
p->index = index;