zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <danielsh@apache.org>
To: zsh-workers@zsh.org
Subject: [PATCH 2/3] _git: Complete bisect/new as well as bisect/bad.
Date: Sun, 12 Jan 2020 22:29:27 +0000	[thread overview]
Message-ID: <20200112222928.25546-2-danielsh@apache.org> (raw)
In-Reply-To: <20200112222928.25546-1-danielsh@apache.org>

Also, complete the bisect/old-$commithash ref names.
---
I'm not sure if completing the bisect/old-* ref names is actually
useful; the completion offers no information on their position in the
bisect trace, just the commit hash.

 Completion/Unix/Command/_git | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7f2c206c1..8e0d57789 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6709,14 +6709,12 @@ __git_heads_local () {
   local f gitdir
   declare -a heads
 
-  heads=(${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname:short)"' refs/heads 2>/dev/null)"})
+  heads=(${(f)"$(_call_program headrefs git for-each-ref --format='"%(refname:short)"' refs/heads refs/bisect refs/stash 2>/dev/null)"})
   gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
   if __git_command_successful $pipestatus; then
     for f in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
       [[ -f $gitdir/$f ]] && heads+=$f
     done
-    [[ -f $gitdir/refs/stash ]] && heads+=stash
-    [[ -f $gitdir/refs/bisect/bad ]] && heads+=bisect/bad
   fi
 
   __git_describe_commit heads heads-local "local head" "$@"

  reply	other threads:[~2020-01-12 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 22:29 [PATCH 1/3] zshexpn: Describe parameter elision and add some introductory prose Daniel Shahaf
2020-01-12 22:29 ` Daniel Shahaf [this message]
2020-01-12 22:29 ` [PATCH 3/3] _git: Complete --contains after -r (--remotes) Daniel Shahaf

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=20200112222928.25546-2-danielsh@apache.org \
    --to=danielsh@apache.org \
    --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).