builtin/clone: set up sparse checkout later
commit360822a3471f779c761694b11f30ff738c6851e9
authorPatrick Steinhardt <ps@pks.im>
Tue, 12 Dec 2023 07:00:59 +0000 (12 08:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Dec 2023 19:16:54 +0000 (12 11:16 -0800)
tree61adc4fbf73f145fa938660704122658d69b8bf2
parent91590293298c132e427851616e660e781596c0d8
builtin/clone: set up sparse checkout later

When asked to do a sparse checkout, then git-clone(1) will spawn
`git sparse-checkout set` to set up the configuration accordingly. This
requires a proper Git repository or otherwise the command will fail. But
as we are about to move creation of the reference database to a later
point, this prerequisite will not hold anymore.

Move the logic to a later point in time where we know to have created
the reference database already.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c