Message ID | 09140cb2ac53773eae19f06e51d6276e03689fc1.1677511700.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 33b1b4c7681703c44babdbd229cc96a3ad540569 |
Headers | show |
Series | Clarify API for dir.[ch] and unpack-trees.[ch] -- mark relevant fields as internal | expand |
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c index 4b7390ce367..8d5ae6f2a60 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -217,7 +217,6 @@ static int update_working_directory(struct pattern_list *pl) o.head_idx = -1; o.src_index = r->index; o.dst_index = r->index; - index_state_init(&o.result, r); o.skip_sparse_checkout = 0; setup_work_tree(); diff --git a/unpack-trees.c b/unpack-trees.c index 6e4ca6fe800..c8dacd76c5f 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -2101,6 +2101,7 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o, old_show_all_errors = o->show_all_errors; o->show_all_errors = 1; + index_state_init(&o->result, o->src_index->repo); /* Sanity checks */ if (!o->update || o->index_only || o->skip_sparse_checkout)