]> git.99rst.org Git - git.git/commit
builtin/sparse-checkout: remove NEED_WORK_TREE flag
authorWilliam Sprent <redacted>
Mon, 27 Mar 2023 07:55:02 +0000 (07:55 +0000)
committerJunio C Hamano <redacted>
Mon, 27 Mar 2023 17:43:51 +0000 (10:43 -0700)
commit24fc2cde6448233dbbe1f6695577a49679ccc98b
treec32d0eb987d1f560ee0252b35e514f0d894723e8
parent27d43aaaf50ef0ae014b88bba294f93658016a2e
builtin/sparse-checkout: remove NEED_WORK_TREE flag

In preparation for adding a sub-command to 'sparse-checkout' that can be
run in a bare repository, remove the 'NEED_WORK_TREE' flag from its
entry in the 'commands' array of 'git.c'.

To avoid that this changes any behaviour, add calls to
'setup_work_tree()' to all of the 'sparse-checkout' sub-commands and add
tests that verify that 'sparse-checkout <cmd>' still fail with a clear
error message telling the user that the command needs a work tree.

Signed-off-by: William Sprent <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/sparse-checkout.c
git.c
t/t1091-sparse-checkout-builtin.sh
git clone https://git.99rst.org/PROJECT