Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _git (large)



On Thu, Sep 27, 2007 at 01:16:00AM +0200, Mikael Magnusson wrote:
> Found another issue, with fix
> There is a reference to __git_tag_ids on line 2677 but i'm not sure
> what it's supposed to do exactly.
> 
> (( $+functions[__git_tag_ids] )) ||
> __git_tag_ids () {
> }
> 
> It should possibly just be removed?

I think this is a better fix, don't you?

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.26
diff -u -r1.26 _git
--- Completion/Unix/Command/_git	25 Sep 2007 18:58:16 -0000	1.26
+++ Completion/Unix/Command/_git	27 Sep 2007 11:29:36 -0000
@@ -2676,6 +2676,12 @@
 
 (( $+functions[__git_tag_ids] )) ||
 __git_tag_ids () {
+  local -a refs
+
+  refs=(${${(f)"$(_call_program tag_ids git ls-remote --tags ./. 2>/dev/null)"}%$'\t'*})
+  __git_command_successful || return
+
+  _wanted tag_id expl 'tag object hash' compadd - $refs
 }
 
 (( $+functions[__git_heads_or_tags] )) ||



Messages sorted by: Reverse Date, Date, Thread, Author