summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-05 22:35:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-05 22:35:00 (GMT)
commitea46d9097bd9f5c215cad65e090884869a4c3451 (patch)
tree7999436a26198fa48dc88acc91dcf5dab65752f8
parentff5134b2fffe202fb48498f15d6e47673f9bd6b2 (diff)
parentd031049da356fc345d75c51ec1fbfbeab0f1c8cb (diff)
downloadgit-ea46d9097bd9f5c215cad65e090884869a4c3451.zip
git-ea46d9097bd9f5c215cad65e090884869a4c3451.tar.gz
git-ea46d9097bd9f5c215cad65e090884869a4c3451.tar.bz2
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
-rw-r--r--Documentation/git-sparse-checkout.txt4
-rw-r--r--contrib/completion/git-completion.bash21
2 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 974ade2..e6f235a 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -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
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6f6430e4..1aac5a5 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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'