summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-02-05 14:35:00 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-05 14:35:00 -0800
commitea46d9097bd9f5c215cad65e090884869a4c3451 (patch)
tree7999436a26198fa48dc88acc91dcf5dab65752f8 /contrib
parentMerge branch 'pb/recurse-submodule-in-worktree-fix' (diff)
parentcompletion: add support for sparse-checkout (diff)
downloadtgif-ea46d9097bd9f5c215cad65e090884869a4c3451.tar.xz
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'