Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:32 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:32 +0300
commit79d92b113cc6b61112b8856eca78b8b97bbaca6a (patch)
tree26dcbea7aa65508a845347b64009328957f37864 /contrib
parentc50f76aa9d40203650fe36107adbad42104f8cf6 (diff)
parentdf70b190bdd2add42a906819f9d41dbf91cf0809 (diff)
Merge branch 'tg/demote-stash-save-in-completion'
The command line completion (in contrib/) has been taught that "git stash save" has been deprecated ("git stash push" is the preferred spelling in the new world) and does not offer it as a possible completion candidate when "git stash push" can be. * tg/demote-stash-save-in-completion: completion: make stash -p and alias for stash push -p completion: stop showing 'save' for stash by default
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash12
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 159e6407df..46047e17ec 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2775,13 +2775,21 @@ _git_show_branch ()
_git_stash ()
{
local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
- local subcommands='push save list show apply clear drop pop create branch'
- local subcommand="$(__git_find_on_cmdline "$subcommands")"
+ local subcommands='push list show apply clear drop pop create branch'
+ local subcommand="$(__git_find_on_cmdline "$subcommands save")"
+ if [ -n "$(__git_find_on_cmdline "-p")" ]; then
+ subcommand="push"
+ fi
if [ -z "$subcommand" ]; then
case "$cur" in
--*)
__gitcomp "$save_opts"
;;
+ sa*)
+ if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
+ __gitcomp "save"
+ fi
+ ;;
*)
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
__gitcomp "$subcommands"