Files
git/builtin
Elijah Newren d526b4dbe1 sparse-checkout: correctly set non-cone mode when expected
commit f2e3a218e8 ("sparse-checkout: enable `set` to initialize
sparse-checkout mode", 2021-12-14) made the `set` command able to
initialize sparse-checkout mode, but it also had to function when
sparse-checkout mode was already setup and the user just wanted to
change the sparsity paths.  So, if the user passed --cone or --no-cone,
then we should override the current setting, but if they didn't pass
either, we should use whatever the current cone mode setting is.

Unfortunately, there was a small error in the logic in that it would not
set the in-memory cone mode value (core_sparse_checkout_one) when
--no-cone was specified, but since it did set the config setting on
disk, any subsequent git invocation would correctly get non-cone mode.
As such, the error did not previously matter.  However, a subsequent
commit will add some logic that depends on core_sparse_checkout_cone
being set to the correct mode, so make sure it is set consistently with
the config values we will be writing to disk.

Reviewed-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-20 00:01:15 -08:00
..
2022-02-09 14:21:00 -08:00
2021-12-21 15:03:17 -08:00
2021-10-28 09:57:09 -07:00
2022-02-09 14:21:00 -08:00
2021-10-23 10:45:25 -07:00
2022-01-10 11:52:56 -08:00
2021-04-14 13:47:21 -07:00
2022-02-09 14:21:00 -08:00
2021-09-28 10:31:02 -07:00
2022-01-10 11:52:53 -08:00
2022-01-03 16:24:15 -08:00
2022-01-10 11:52:56 -08:00
2022-02-05 09:42:31 -08:00
2022-01-05 13:31:00 -08:00
2021-11-03 13:25:36 -07:00