1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-26 18:01:03 +02:00

41339: Unquote treeish argument for git checkout completion

This commit is contained in:
Peter Stephenson 2017-06-22 10:05:07 +01:00
parent 825f84c77e
commit c5783576e8
2 changed files with 5 additions and 2 deletions

View file

@ -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.

View file

@ -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