summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-09 01:06:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-06-09 01:06:29 (GMT)
commita8ecd0190d743f19d20917197f95317955354941 (patch)
tree1af53fca7e09fe57e7fbcf5c245917a2fdf37250 /contrib/completion/git-completion.bash
parent7e75aeb290b5f0d858019359fee4e0132637c726 (diff)
parentfffd0cf520718fcd0315bc5e0ee7a6d4762b96b4 (diff)
downloadgit-a8ecd0190d743f19d20917197f95317955354941.zip
git-a8ecd0190d743f19d20917197f95317955354941.tar.gz
git-a8ecd0190d743f19d20917197f95317955354941.tar.bz2
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
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ad6934a..4b59004 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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