zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: git object type detection
       [not found] <CGME20170621154649eucas1p2c9029cf17af4406ce46bdc94ff93e1d6@eucas1p2.samsung.com>
@ 2017-06-21 15:46 ` Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2017-06-21 15:46 UTC (permalink / raw)
  To: Zsh Hackers' List

More quoting woes --- I suspect this change needs to be applied in other
places.

git checkout HEAD\^

didn't complete the right set of files after it because it didn't
recognise HEAD\^ as "treeish" because git didn't like the backslash.
Remove that and it works.

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a46e3b5..f764daf 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

pws


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-21 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170621154649eucas1p2c9029cf17af4406ce46bdc94ff93e1d6@eucas1p2.samsung.com>
2017-06-21 15:46 ` PATCH: git object type detection Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).