sparse-checkout: avoid using internal API of unpack-trees, take 2
commit33b1b4c7681703c44babdbd229cc96a3ad540569
authorElijah Newren <newren@gmail.com>
Mon, 27 Feb 2023 15:28:15 +0000 (27 15:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2023 16:29:51 +0000 (27 08:29 -0800)
tree29bc60912da0e3bab3955d05a88f579f8ead221e
parent1147c56ff70d5d1152601a73c9e76b9856ceebf6
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>
builtin/sparse-checkout.c
unpack-trees.c