From: Junio C Hamano Date: Wed, 3 Feb 2016 22:16:06 +0000 (-0800) Subject: Merge branch 'pw/completion-stash' X-Git-Tag: v2.8.0-rc0~73 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ebcdd635c58e89dbf931a9f90a1b248fb5e90315?ds=inline;hp=-c Merge branch 'pw/completion-stash' * pw/completion-stash: completion: update completion arguments for stash --- ebcdd635c58e89dbf931a9f90a1b248fb5e90315 diff --combined contrib/completion/git-completion.bash index 8e783eacf1,07fa13b567..15ebba51dc --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -1169,7 -1169,7 +1169,7 @@@ __git_diff_common_options="--stat --num --no-prefix --src-prefix= --dst-prefix= --inter-hunk-context= --patience --histogram --minimal - --raw --word-diff + --raw --word-diff --word-diff-regex= --dirstat --dirstat= --dirstat-by-file --dirstat-by-file= --cumulative --diff-algorithm= @@@ -1312,7 -1312,6 +1312,7 @@@ _git_grep ( --full-name --line-number --extended-regexp --basic-regexp --fixed-strings --perl-regexp + --threads --files-with-matches --name-only --files-without-match --max-depth @@@ -1688,12 -1687,8 +1688,12 @@@ _git_rebase ( --preserve-merges --stat --no-stat --committer-date-is-author-date --ignore-date --ignore-whitespace --whitespace= - --autosquash --fork-point --no-fork-point - --autostash + --autosquash --no-autosquash + --fork-point --no-fork-point + --autostash --no-autostash + --verify --no-verify + --keep-empty --root --force-rebase --no-ff + --exec " return @@@ -1813,7 -1808,7 +1813,7 @@@ _git_config ( return ;; branch.*.rebase) - __gitcomp "false true" + __gitcomp "false true preserve interactive" return ;; remote.pushdefault) @@@ -2373,7 -2368,7 +2373,7 @@@ _git_show_branch ( case "$cur" in --*) __gitcomp " - --all --remotes --topo-order --current --more= + --all --remotes --topo-order --date-order --current --more= --list --independent --merge-base --no-name --color --no-color --sha1-name --sparse --topics --reflog @@@ -2386,7 -2381,7 +2386,7 @@@ _git_stash () { - local save_opts='--keep-index --no-keep-index --quiet --patch' + local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked' local subcommands='save list show apply clear drop pop create branch' local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then @@@ -2408,9 -2403,20 +2408,20 @@@ apply,--*|pop,--*) __gitcomp "--index --quiet" ;; - show,--*|drop,--*|branch,--*) + drop,--*) + __gitcomp "--quiet" ;; - show,*|apply,*|drop,*|pop,*|branch,*) + show,--*|branch,--*) + ;; + branch,*) + if [ $cword -eq 3 ]; then + __gitcomp_nl "$(__git_refs)"; + else + __gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \ + | sed -n -e 's/:.*//p')" + fi + ;; + show,*|apply,*|drop,*|pop,*) __gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \ | sed -n -e 's/:.*//p')" ;;