Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: _git log arguments
- X-seq: zsh-workers 23887
- From: Clint Adams <clint@xxxxxxx>
- To: Nikolai Weibull <now@xxxxxxxx>
- Subject: Re: PATCH: _git log arguments
- Date: Mon, 1 Oct 2007 09:36:35 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <dbfc82860710010016y4770a963k5e8a3c088f8cc7a1@xxxxxxxxxxxxxx>
- Mail-followup-to: Nikolai Weibull <now@xxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070930194014.GA18558@xxxxxxxxxxx> <dbfc82860710010016y4770a963k5e8a3c088f8cc7a1@xxxxxxxxxxxxxx>
On Mon, Oct 01, 2007 at 09:16:54AM +0200, Nikolai Weibull wrote:
> Why use "$revision_arguments[@]"?  $revision_arguments works just as
> good and you don't need all the quoting and expansion fluff.  I see
> this style has been used for $merge_args as well, even though most of
> the file doesn't.
I seem to recall it being necessary for $merge_args, though I don't
recall the specifics.
> > +    '*:tree-ish: _alternative c\:\:__git_committishs f\:\:_files' && ret=0
> 
> I don't like this at all.  Why not simply use __git_cached_files?  And
> if we really need __git_committishs, let's at least use a separate
> function for that with proper descriptions and tags.
Your patch reworked against HEAD is below.   Now how do we accommodate
the people that want to have a branch name completed after git log?
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.36
diff -u -r1.36 _git
--- Completion/Unix/Command/_git	30 Sep 2007 19:41:57 -0000	1.36
+++ Completion/Unix/Command/_git	1 Oct 2007 13:33:46 -0000
@@ -1705,8 +1705,8 @@
   __git_setup_revision_arguments
 
   _arguments -S \
-    "$revision_arguments[@]" \
-    '*:tree-ish: _alternative c\:\:__git_committishs f\:\:_files' && ret=0
+    $revision_arguments \
+    '*:file:__git_cached_files' && ret=0
 }
 
 # TODO: repository needs fixing
Messages sorted by:
Reverse Date,
Date,
Thread,
Author