On 5/4/2021 12:27 PM, Matheus Tavares wrote:> @@ -359,16 +360,22 @@ static int checkout_worktree(const struct checkout_opts *opts, > int nr_checkouts = 0, nr_unmerged = 0; > int errs = 0; > int pos; > + int pc_workers, pc_threshold; > + struct mem_pool ce_mem_pool; > > state.force = 1; > state.refresh_cache = 1; > state.istate = &the_index; > > + mem_pool_init(&ce_mem_pool, 0); > + get_parallel_checkout_configs(&pc_workers, &pc_threshold); > init_checkout_metadata(&state.meta, info->refname, > info->commit ? &info->commit->object.oid : &info->oid, > NULL); > > enable_delayed_checkout(&state); > + if (pc_workers > 1) > + init_parallel_checkout(); > > /* TODO: audit for interaction with sparse-index. */ > ensure_full_index(&the_index); Since this context piece is new as of your rebase, I did a quick check on all of the calls you inserted above and found them to be safe with the sparse-index. They do not care about the number of cache entries, for example. Thanks, -Stolee