diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-02-05 14:35:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-05 14:35:00 -0800 |
commit | ea46d9097bd9f5c215cad65e090884869a4c3451 (patch) | |
tree | 7999436a26198fa48dc88acc91dcf5dab65752f8 /contrib | |
parent | ff5134b2fffe202fb48498f15d6e47673f9bd6b2 (diff) | |
parent | d031049da356fc345d75c51ec1fbfbeab0f1c8cb (diff) | |
download | git-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.bash | 21 |
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' |