From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1373 invoked from network); 4 Oct 2007 08:27:52 -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; 4 Oct 2007 08:27:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 89053 invoked from network); 4 Oct 2007 08:27:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Oct 2007 08:27:46 -0000 Received: (qmail 14508 invoked by alias); 4 Oct 2007 08:27:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23905 Received: (qmail 14491 invoked from network); 4 Oct 2007 08:27:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Oct 2007 08:27:43 -0000 Received: (qmail 88802 invoked from network); 4 Oct 2007 08:27:43 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 4 Oct 2007 08:27:38 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id D9A3C5C2B0; Thu, 4 Oct 2007 04:27:36 -0400 (EDT) Date: Thu, 4 Oct 2007 04:27:36 -0400 From: Clint Adams To: Nikolai Weibull Cc: Mikael Magnusson , zsh-workers Subject: Re: Make git-commit complete both modified files and git-added files. Message-ID: <20071004082736.GA17606@scowler.net> Mail-Followup-To: Nikolai Weibull , Mikael Magnusson , zsh-workers References: <237967ef0710031805r1124449dmc4c55e7545a81e0a@mail.gmail.com> 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 Thu, Oct 04, 2007 at 10:05:49AM +0200, Nikolai Weibull wrote: > What do you need gitdir for? He doesn't. "files" is a pretty generic name for a tag. Index: Completion/Unix/Command/_git =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v retrieving revision 1.40 diff -u -r1.40 _git --- Completion/Unix/Command/_git 4 Oct 2007 08:24:33 -0000 1.40 +++ Completion/Unix/Command/_git 4 Oct 2007 08:25:55 -0000 @@ -2627,8 +2627,7 @@ #this is for git-commit which can take files both git-added and not (( $+functions[__git_changed_files] )) || __git_changed_files () { - gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null) - __git_command_successful || return + local -a files files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only HEAD 2>/dev/null)"}) __git_command_successful || return