zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: PATCH: git object type detection
Date: Wed, 21 Jun 2017 16:46:46 +0100	[thread overview]
Message-ID: <20170621164646.23df7ff0@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CGME20170621154649eucas1p2c9029cf17af4406ce46bdc94ff93e1d6@eucas1p2.samsung.com>

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


           reply	other threads:[~2017-06-21 15:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CGME20170621154649eucas1p2c9029cf17af4406ce46bdc94ff93e1d6@eucas1p2.samsung.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170621164646.23df7ff0@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).