perf: add test for writing the index
[gitweb.git] / preload-index.c
index 79ce8a998b0008f9182fa127b85d63feff4592d0..70a4c808783bab92b4b6319e3dbd8e16641b1918 100644 (file)
@@ -53,6 +53,8 @@ static void *preload_thread(void *_data)
                        continue;
                if (ce_uptodate(ce))
                        continue;
+               if (ce_skip_worktree(ce))
+                       continue;
                if (!ce_path_match(ce, &p->pathspec, NULL))
                        continue;
                if (threaded_has_symlink_leading_path(&cache, ce->name, ce_namelen(ce)))
@@ -63,7 +65,7 @@ static void *preload_thread(void *_data)
                        continue;
                ce_mark_uptodate(ce);
        } while (--nr > 0);
-       cache_def_free(&cache);
+       cache_def_clear(&cache);
        return NULL;
 }