From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6142 invoked by alias); 26 Apr 2011 21:13:15 -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: 29065 Received: (qmail 3816 invoked from network); 26 Apr 2011 21:13:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/q9T6OVNhO4o+DhQz/z3uA5aUDxiJcEMHOEC8eCkqTs=; b=Cj6Nb4VixuIWJiaVkJV4far/ensa76BWfnQuOWQ7d95FCLm4iHmKML05H8hg70Ab/W 2bZD3wPsK5noBY5/IP5/0ple0egNboHNwE+KvxK9j9iH1gNwFknMYeFAELenJyUJfGXD fhN/1LzrbAyLpg52yIa5xF9XPbzdsTk3N2VTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UORLR5sdSNwyCRWXPIVrOy21vIksfAR9obsZZSua9RGf/QVUEqittxzoeHbgRDS9iX wVI2x68Q2ZdROP8uIrxJgIvJTCczIS5cqXv/6Bw3nBYXh7XqZBWIMPlMA9U/sUEzJMZC t5ccn6UvCIss+029J3CkCxaPUd7vKJ81Jq/KY= MIME-Version: 1.0 In-Reply-To: References: <87liyw7t0o.fsf@ft.bewatermyfriend.org> Date: Tue, 26 Apr 2011 23:13:00 +0200 Message-ID: Subject: Re: Slowness issue with git completion From: Mikael Magnusson To: Felipe Contreras Cc: Frank Terbeck , zsh-workers@zsh.org, Nikolai Weibull Content-Type: text/plain; charset=UTF-8 On 26 April 2011 23:10, Felipe Contreras wrote: > On Tue, Apr 26, 2011 at 11:59 PM, Mikael Magnusson wrote: >>>> git accepts files with or without a -- >>> >>> So? >> >> So if the command works, we should complete it. > > Even if it's so slow that it is unusable? I don't understand the urge > to have that, nobody seems to be complaining about that behavior with > the bash completion. Even git itself warns when you have a ref and a > file that are ambiguous; you need to manually add "--". It's only slow in repos as large as the linux one. > BTW. The actual behavior is: if there's a ref, go for refs, if there's > no ref, try the files. So 'git show v' first would show the version > refs, but 'git show vi' will show the 'virt' directory. I don't see > how that is so atrocious. You can still auto-complete commands that > work. > >>>>> Moreover, why do you want to be smarter than git? There are ways to >>>>> ask git precisely what we want: list the contents of certain tree-ish >>>>> on-demand. And in fact, that's exactly what the bash completion does: >>>>> >>>>> time git ls-tree HEAD -- (0m0.005s) >>>>> time git ls-tree HEAD -- drivers/ (0m0.007s) >>>> >>>> git ls-tree doesn't allow you to filter the output files by 'changed', >>>> 'new', 'unknown' etc etc. >>> >>> So? >> >> So we can use ls-tree for log i guess, but not for much else, git add >> will still be slow for example. > > Why do you need any git command at all to find completions for 'git > add'? Just use the normal local file completion. Because you don't want to complete unchanged files when adding? -- Mikael Magnusson