summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-05 14:35:00 -0800
committerJunio C Hamano <gitster@pobox.com>2020-02-05 14:35:00 -0800
commitea46d9097bd9f5c215cad65e090884869a4c3451 (patch)
tree7999436a26198fa48dc88acc91dcf5dab65752f8 /contrib
parentff5134b2fffe202fb48498f15d6e47673f9bd6b2 (diff)
parentd031049da356fc345d75c51ec1fbfbeab0f1c8cb (diff)
downloadgit-ea46d9097bd9f5c215cad65e090884869a4c3451.tar.gz
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6f6430e4e6..1aac5a56c0 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'