sparse-checkout: use new update_sparsity() function
commitf56f31af0301f6446f8689ba1a997d74fb82f45f
authorElijah Newren <newren@gmail.com>
Fri, 27 Mar 2020 00:48:53 +0000 (27 00:48 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 18:33:30 +0000 (27 11:33 -0700)
tree3aebd0beeaec2d800c2a2109881dac5069dc0010
parent7af7a25853cb87f34d192ba1d813ca09ee15d9f4
sparse-checkout: use new update_sparsity() function

Remove the equivalent of 'git read-tree -mu HEAD' in the sparse-checkout
codepaths for setting the SKIP_WORKTREE bits and instead use the new
update_sparsity() function.

Note that when an issue is hit, the error message splits 'error' and
'Cannot update sparse checkout' on separate lines.  For now, we use two
greps to find both pieces of the error message but subsequent commits
will clean up the messages reported to the user.

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