Merge branch 'mt/sparse-checkout-doc-update'

Doc update.

* mt/sparse-checkout-doc-update:
  completion: add support for sparse-checkout
  doc: sparse-checkout: mention --cone option
maint
Junio C Hamano 2020-02-05 14:35:00 -08:00
commit ea46d9097b
2 changed files with 25 additions and 0 deletions

View File

@ -41,6 +41,10 @@ COMMANDS
To avoid interfering with other worktrees, it first enables the
`extensions.worktreeConfig` setting and makes sure to set the
`core.sparseCheckout` setting in the worktree-specific config file.
+
When `--cone` is provided, the `core.sparseCheckoutCone` setting is
also set, allowing for better performance with a limited set of
patterns (see 'CONE PATTERN SET' below).

'set'::
Write a set of patterns to the sparse-checkout file, as given as

View File

@ -2735,6 +2735,27 @@ _git_show_branch ()
__git_complete_revlist
}

_git_sparse_checkout ()
{
local subcommands="list init set disable"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
return
fi

case "$subcommand,$cur" in
init,--*)
__gitcomp "--cone"
;;
set,--*)
__gitcomp "--stdin"
;;
*)
;;
esac
}

_git_stash ()
{
local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'