Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-02-27 18:28:15 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-27 19:29:51 +0300
commit33b1b4c7681703c44babdbd229cc96a3ad540569 (patch)
tree29bc60912da0e3bab3955d05a88f579f8ead221e /unpack-trees.c
parent1147c56ff70d5d1152601a73c9e76b9856ceebf6 (diff)
sparse-checkout: avoid using internal API of unpack-trees, take 2
Commit 2f6b1eb794 ("cache API: add a "INDEX_STATE_INIT" macro/function, add release_index()", 2023-01-12) mistakenly added some initialization of a member of unpack_trees_options that was intended to be internal-only. This initialization should be done within update_sparsity() instead. Note that while o->result is mostly meant for unpack_trees() and update_sparsity() mostly operates without o->result, check_ok_to_remove() does consult it so we need to ensure it is properly initialized. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 6e4ca6fe80..c8dacd76c5 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)