subtree: improve decision on merges kept in split
[gitweb.git] / preload-index.c
index 2a83255e4eeaf8e8ce74516880b0333b23d6f583..f7365761f4725d6f7ddbb6d8c9c8fe92488de6ce 100644 (file)
@@ -58,7 +58,7 @@ static void *preload_thread(void *_data)
                        continue;
                if (ce->ce_flags & CE_FSMONITOR_VALID)
                        continue;
-               if (!ce_path_match(ce, &p->pathspec, NULL))
+               if (!ce_path_match(index, ce, &p->pathspec, NULL))
                        continue;
                if (threaded_has_symlink_leading_path(&cache, ce->name, ce_namelen(ce)))
                        continue;
@@ -87,6 +87,7 @@ static void preload_index(struct index_state *index,
                threads = 2;
        if (threads < 2)
                return;
+       trace_performance_enter();
        if (threads > MAX_PARALLEL)
                threads = MAX_PARALLEL;
        offset = 0;
@@ -108,6 +109,7 @@ static void preload_index(struct index_state *index,
                if (pthread_join(p->pthread, NULL))
                        die("unable to join threaded lstat");
        }
+       trace_performance_leave("preload index");
 }
 #endif