From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3816 invoked from network); 21 Aug 2008 02:22:29 -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 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Aug 2008 02:22:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 52474 invoked from network); 21 Aug 2008 02:22:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Aug 2008 02:22:23 -0000 Received: (qmail 11290 invoked by alias); 21 Aug 2008 02:22:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25497 Received: (qmail 11279 invoked from network); 21 Aug 2008 02:22:12 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 21 Aug 2008 02:22:12 -0000 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by bifrost.dotsrc.org (Postfix) with ESMTP id 00072801E2B4 for ; Thu, 21 Aug 2008 04:22:08 +0200 (CEST) Received: by nf-out-0910.google.com with SMTP id g13so1018706nfb.11 for ; Wed, 20 Aug 2008 19:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=eMc/Ur3X3Lb9nEviLLjlG3JAgqxYh+5P/qHuWBMp9GU=; b=r9uR2+42hRWuELZdcVm2tHNscNJzpWsJJkbj7i8dGfy9vQTuP1pIL9EmS2N4ksGHhS cvEYspJ3ggusYy8eVXbzmOvPFqXaBFaS2oXS8G90qACc7Qyb9+ax4/t7mFEIIS3PrHT8 3/m6rQR+TV/pIYlCULBpRj6Eo11NLOYBGa27o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=N4EZbihSAbr3dbpa41pXLoPHy9w3+Q+dIBsHQZQrtqVOvjkBrCPeKg3Hn7/THt3OKH qGkHGIW/U4b6jOjMP/v+TZh5zjZbV/wmM9LT7LNHTko2yKjClk7r9Hso/HPkgrKDqu4M z32MLOAsCTGHy5RAvN7Ml7aGpuGcQ3Fwianww= Received: by 10.210.72.14 with SMTP id u14mr1079699eba.177.1219285328651; Wed, 20 Aug 2008 19:22:08 -0700 (PDT) Received: by 10.210.19.20 with HTTP; Wed, 20 Aug 2008 19:22:08 -0700 (PDT) Message-ID: <237967ef0808201922g91dd092w5da31759495b74b7@mail.gmail.com> Date: Thu, 21 Aug 2008 04:22:08 +0200 From: "Mikael Magnusson" To: zsh-workers@sunsite.dk Subject: Re: git checkout improvement In-Reply-To: <237967ef0808201918t4c21baefj456fb9be0605d430@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080821000948.GA20166@scru.org> <237967ef0808201720x594dae53x215b078420b1ccb6@mail.gmail.com> <20080821005259.GA21325@scru.org> <237967ef0808201918t4c21baefj456fb9be0605d430@mail.gmail.com> X-Virus-Scanned: ClamAV 0.92.1/8061/Thu Aug 21 02:00:17 2008 on bifrost X-Virus-Status: Clean 2008/8/21 Mikael Magnusson : > 2008/8/21 Clint Adams : >> On Thu, Aug 21, 2008 at 02:20:49AM +0200, Mikael Magnusson wrote: >>> I also noticed completing files from the index doesn't work as well as >>> completing files from a given tree... eg, If you type >>> git checkout HEAD gi >>> you get git.c, but if you >>> git checkout -- gi >>> you get nothing. However, >>> git checkout -- >>> lists all the files, and lets you cycle through them until you reach git.c >>> It uses __git_cached_files for that case, but some other places that call >>> that work just fine with something already typed. You got any idea? >> >> I am getting confused here. Can you use -- when there's a tree-ish on >> the line? > > Yes. All of these are valid commands: > git checkout git.c > git checkout HEAD git.c > git checkout -- git.c > git checkout HEAD -- git.c Another problem is you can do git checkout git.c NEWS but then we try to use git.c as a tree-ish which obviously doesn't work. Probably we should check if words[1] (or whatever) is a valid tree-ish, and if not, complete files from the index instead. -- Mikael Magnusson