sparse-checkout: split out code for tweaking settings config
commitbe61fd1181f62dcb7b6a5f41021e7f086d7c30b0
authorElijah Newren <newren@gmail.com>
Tue, 14 Dec 2021 04:09:07 +0000 (14 04:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Dec 2021 19:48:22 +0000 (15 11:48 -0800)
tree6771096c9b933ff84e74352584c2c8264c1fe231
parentf85751a147996f7f0a8edf3ea2a00217c9ddfc99
sparse-checkout: split out code for tweaking settings config

`init` has some code for handling updates to either cone mode or
the sparse-index setting.  We would like to be able to reuse this
elsewhere, namely in `set` and `reapply`.  Split this function out,
and make it slightly more general so it can handle being called from
the new callers.

Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Victoria Dye <vdye@github.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/sparse-checkout.c