diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-06-09 04:06:29 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-09 04:06:29 +0300 |
commit | a8ecd0190d743f19d20917197f95317955354941 (patch) | |
tree | 1af53fca7e09fe57e7fbcf5c245917a2fdf37250 /contrib/completion/git-completion.bash | |
parent | 7e75aeb290b5f0d858019359fee4e0132637c726 (diff) | |
parent | fffd0cf520718fcd0315bc5e0ee7a6d4762b96b4 (diff) |
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.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ad6934a386..4b59004847 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 |