From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15526 invoked from network); 1 Oct 2007 13:36:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Oct 2007 13:36:53 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 63906 invoked from network); 1 Oct 2007 13:36:48 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Oct 2007 13:36:48 -0000 Received: (qmail 21458 invoked by alias); 1 Oct 2007 13:36:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23887 Received: (qmail 21442 invoked from network); 1 Oct 2007 13:36:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Oct 2007 13:36:41 -0000 Received: (qmail 63204 invoked from network); 1 Oct 2007 13:36:41 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 1 Oct 2007 13:36:36 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 80F855C380; Mon, 1 Oct 2007 09:36:35 -0400 (EDT) Date: Mon, 1 Oct 2007 09:36:35 -0400 From: Clint Adams To: Nikolai Weibull Cc: zsh-workers@sunsite.dk Subject: Re: PATCH: _git log arguments Message-ID: <20071001133635.GA10543@scowler.net> Mail-Followup-To: Nikolai Weibull , zsh-workers@sunsite.dk References: <20070930194014.GA18558@scowler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) 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