Skip to content

Commit a8ecd01

Browse files
committed
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
2 parents 7e75aeb + fffd0cf commit a8ecd01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ _git_stash ()
27822782
local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
27832783
local subcommands='push list show apply clear drop pop create branch'
27842784
local subcommand="$(__git_find_on_cmdline "$subcommands save")"
2785-
if [ -n "$(__git_find_on_cmdline "-p")" ]; then
2785+
if [ -z "$subcommand" -a -n "$(__git_find_on_cmdline "-p")" ]; then
27862786
subcommand="push"
27872787
fi
27882788
if [ -z "$subcommand" ]; then

0 commit comments

Comments
 (0)