Browse Source

Merge branch 'vs/complete-stash-show-p-fix'

The command line completion script (in contrib/) tried to complete
"git stash -p" as if it were "git stash push -p", but it was too
aggressive and also affected "git stash show -p", which has been
corrected.

* vs/complete-stash-show-p-fix:
  completion: don't override given stash subcommand with -p
maint
Junio C Hamano 5 years ago
parent
commit
a8ecd0190d
  1. 2
      contrib/completion/git-completion.bash

2
contrib/completion/git-completion.bash

@ -2782,7 +2782,7 @@ _git_stash () @@ -2782,7 +2782,7 @@ _git_stash ()
local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
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
if [ -z "$subcommand" -a -n "$(__git_find_on_cmdline "-p")" ]; then
subcommand="push"
fi
if [ -z "$subcommand" ]; then

Loading…
Cancel
Save