From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6502 invoked from network); 4 Oct 2007 08:06:09 -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:06:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 80844 invoked from network); 4 Oct 2007 08:06:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Oct 2007 08:06:00 -0000 Received: (qmail 27791 invoked by alias); 4 Oct 2007 08:05:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23904 Received: (qmail 27769 invoked from network); 4 Oct 2007 08:05:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Oct 2007 08:05:57 -0000 Received: (qmail 80612 invoked from network); 4 Oct 2007 08:05:57 -0000 Received: from mu-out-0910.google.com (209.85.134.188) by a.mx.sunsite.dk with SMTP; 4 Oct 2007 08:05:51 -0000 Received: by mu-out-0910.google.com with SMTP id w9so106350mue for ; Thu, 04 Oct 2007 01:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=92+/eGrrP0xszfmhnvr2mMJWIY5lRR68JexVoSz+vAI=; b=MxTRQdVvPd3yGrpFzXMBGhtOucSRDq6bIJjh0WEhrbrYdxbo4WRcthSpaDSzsimU56v4abBfq+O52y1dUP7vvCjfDBXX5Bq12xqvEh76LboONxu1Q8tpPC/Qjy/qLScZeEqr8+HqkSntOjkg/p38Z6GUfePiZuv90DRKSvBTxyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=HffVyMdi4KeRTGb7vHexhs7bRRK2xWRU+60oTx93Q2XmU47TylhrSr8rB3bHOrzWka/LwDslkziyLKSlD0lQ8FgesQdj5b8uhkApsf66UznRkoJHCVp+2OSIvqe/3o89he2uZmVjBaqN52L/4NRcayFd+sFsNzKF7pkZL8ibc/s= Received: by 10.64.3.9 with SMTP id 9mr3587634qbc.1191485149836; Thu, 04 Oct 2007 01:05:49 -0700 (PDT) Received: by 10.90.93.19 with HTTP; Thu, 4 Oct 2007 01:05:49 -0700 (PDT) Message-ID: Date: Thu, 4 Oct 2007 10:05:49 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Mikael Magnusson" Subject: Re: Make git-commit complete both modified files and git-added files. Cc: zsh-workers , "Clint Adams" In-Reply-To: <237967ef0710031805r1124449dmc4c55e7545a81e0a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0710031805r1124449dmc4c55e7545a81e0a@mail.gmail.com> X-Google-Sender-Auth: d4668278bc5e1b59 On 10/4/07, Mikael Magnusson wrote: > +#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 What do you need gitdir for? > + > + files=(${(ps:\0:)"$(_call_program files git diff-index -z > --name-only HEAD 2>/dev/null)"}) > + __git_command_successful || return > + > + _wanted files expl 'index file' _multi_parts $@ - / files > +} > + > (( $+functions[__git_tree_files] )) || > __git_tree_files () { > local multi_parts_opts