From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25850 invoked by alias); 22 Mar 2010 09:27:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27819 Received: (qmail 838 invoked from network); 22 Mar 2010 09:27:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.212 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=oGG/7ijMZB6Zv/6ArpmFKAJv0U62PTlR4d1qZcbrZno=; b=jg70Tfz8WWAUSFp2vMsvJEnggb6/Ks1SCxAiXHZuSpl5UU24sFn3MVis8rK4FEt/u4 qV6LWMRRQS5OvHLHLCUJTXlq6ry2HUqhgY5Fztgq81Z9LO/wQ99rq5DsInN4i11C+vmd V1QSNxA2aZLHP8MEBnZlrZk9N/Bj6x3cDCW+A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Sqysvo0hwSlJpc04KHOp4Ewb7xmxlRCCkvq+Yp8k33a0i6xNuH3vyO11jGo8RMMfH9 GcovA0uU1n20huv5aLtrKBqCT9Hg+K7hokaUCEtS0nD3UA0XZyuWjHeoVErmuOx+VXM1 i5E6cxaL8DWQde78DOHMHjWnd7oitNGKZB0J0= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com In-Reply-To: References: <20100321172336.GA4151@ruderich.org> <20100322012544.GA6014@ruderich.org> Date: Mon, 22 Mar 2010 10:27:29 +0100 X-Google-Sender-Auth: 688992ca473ad099 Message-ID: Subject: Re: [PATCH] _git: Also complete FETCH_HEAD, ORIG_HEAD and MERGE_HEAD. From: Nikolai Weibull To: "Benjamin R. Haskell" Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Mar 22, 2010 at 03:30, Benjamin R. Haskell wrote: > Testing the existence of $gitdir/{refname} seems a fine compromise. > (Really, I don't see the issue; this seems like a drop in the bucket of > _git's performance issues... =C2=A0I s'pose the forks are prohibitively > expensive on Win32? =C2=A0Revised patch below anyway.) > (In case it's unclear, I prefer my previous patch -- doesn't _git fork > all over the place? -- but either one's preferable to no-change or > always-adding-them.) Yes, it does, and, as you mention, it=E2=80=99s horribly slow to fork on Windows. I mean, what where they thinking? But I question the value of forking for this particular test. Still, it=E2=80=99s more correct to u= se rev-parse. As your patch uses rev-parse to find gitdir once already, we=E2=80=99re not gaining much by globbing instead. I just ran a benchmark on Cygwin and it takes about 0.5 seconds to run four rev-parses. Perhaps completing them all without checking if they=E2=80=99re valid beforehand is the best solution?