about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-08-18 01:49:18 +0000
committerClint Adams <clint@users.sourceforge.net>2008-08-18 01:49:18 +0000
commit45195791a81784ce6def23f24a2af420f246328e (patch)
tree935b74d066b01d3cfd42af753405c13dbbc32603 /Completion
parent6f0734c6322a78630e261688b6b21628be3593eb (diff)
downloadzsh-45195791a81784ce6def23f24a2af420f246328e.tar.gz
zsh-45195791a81784ce6def23f24a2af420f246328e.tar.xz
zsh-45195791a81784ce6def23f24a2af420f246328e.zip
25475: determine heads, tags, and branches through git for-each-ref instead of git tag and git branch.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index f19d5d120..9045479f1 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2966,7 +2966,7 @@ __git_heads () {
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program heads git branch --no-color -a 2>/dev/null)"}#[* ] })
+  branch_names=(${${(f)"$(_call_program headrefs git for-each-ref --format='%(refname)' refs/heads refs/remotes 2>/dev/null)"}#refs/(heads|remotes)/})
   __git_command_successful || return
 
   _wanted heads expl branch-name compadd $* - $branch_names HEAD
@@ -2977,7 +2977,7 @@ __git_tags () {
   local expl
   declare -a tag_names
 
-  tag_names=(${${(f)"$(_call_program tags git tag -l 2>/dev/null)"}#[* ] })
+  tag_names=(${${(f)"$(_call_program tagrefs git for-each-ref --format='%(refname)' refs/tags 2>/dev/null)"}#refs/tags/})
   __git_command_successful || return
 
   _wanted tags expl tag-name compadd $* - $tag_names
@@ -3030,7 +3030,7 @@ __git_branch_names () {
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program branch-names git branch --no-color 2>/dev/null)"}#[* ] })
+  branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='%(refname)' refs/heads 2>/dev/null)"}#refs/heads/})
   __git_command_successful || return
 
   _wanted branch-names expl branch-name compadd $* - $branch_names