sparse-checkout: create 'init' subcommand
commitbab3c3590879c5680060a5d5e2b93b4f97519025
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 21 Nov 2019 22:04:34 +0000 (21 22:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Nov 2019 07:11:43 +0000 (22 16:11 +0900)
treebab1c9b6e1113f3144dc8772f578f18c573728a0
parent94c0956b60969bbbb3ead19638d52591a59d713c
sparse-checkout: create 'init' subcommand

Getting started with a sparse-checkout file can be daunting. Help
users start their sparse enlistment using 'git sparse-checkout init'.
This will set 'core.sparseCheckout=true' in their config, write
an initial set of patterns to the sparse-checkout file, and update
their working directory.

Make sure to use the `extensions.worktreeConfig` setting and write
the sparse checkout config to the worktree-specific config file.
This avoids confusing interactions with other worktrees.

The use of running another process for 'git read-tree' is sub-
optimal. This will be removed in a later change.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-sparse-checkout.txt
builtin/sparse-checkout.c
t/t1091-sparse-checkout-builtin.sh