]> git.99rst.org Git - git.git/commit
sparse-checkout: add sanity-checks on initial sparsity state
authorElijah Newren <redacted>
Tue, 14 Dec 2021 04:09:05 +0000 (04:09 +0000)
committerJunio C Hamano <redacted>
Wed, 15 Dec 2021 19:48:21 +0000 (11:48 -0800)
commit45c5e47048a89e08a9e844bcf976401af8b60478
tree8ff38c1c5ddd9b343ec3a99e0656f9b1edaa3cc9
parent0b624e039cc2c9e30333445e8c67002f41d63678
sparse-checkout: add sanity-checks on initial sparsity state

Most sparse-checkout subcommands (list, add, reapply) only make sense
when already in a sparse state.  Add a quick check that will error out
early if this is not the case.

Also document with a comment why we do not exit early in `disable` even
when core.sparseCheckout starts as false.

Reviewed-by: Derrick Stolee <redacted>
Reviewed-by: Victoria Dye <redacted>
Signed-off-by: Elijah Newren <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/sparse-checkout.c
t/t1091-sparse-checkout-builtin.sh
git clone https://git.99rst.org/PROJECT