diff options
author | Peter Stephenson <pws@zsh.org> | 2017-06-22 10:05:07 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-06-22 10:05:07 +0100 |
commit | c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe (patch) | |
tree | 422a2a21037cd1c2bbd2dacb85de020952bee47b | |
parent | 825f84c77e7e6f31d5f0fc9dd636198477c9a357 (diff) | |
download | zsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.tar.gz zsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.tar.xz zsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.zip |
41339: Unquote treeish argument for git checkout completion
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 7699b6528..7c53f70d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2017-06-22 Peter Stephenson <p.stephenson@samsung.com> + * 41339: Completion/Unix/Command/_git: unquote treeish argument + for git checkout completion. + * Phil: 41308, tweaked: Src/Modules/pcre.c, Test/V07pcre.ztst: Behaviour of PCRE with NULL bytes. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a46e3b55d..f764daf75 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -495,8 +495,8 @@ _git-checkout () { elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan|--detach]} ]]; then _nothing - elif [[ -n $line[1] ]] && __git_is_treeish $line[1]; then - __git_ignore_line __git_tree_files ${PREFIX:-.} $line[1] && ret=0 + elif [[ -n $line[1] ]] && __git_is_treeish ${(Q)line[1]}; then + __git_ignore_line __git_tree_files ${PREFIX:-.} ${(Q)line[1]} && ret=0 else __git_ignore_line __git_modified_files && ret=0 fi |