From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22544 invoked from network); 28 Aug 2008 18:04:40 -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=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; 28 Aug 2008 18:04:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 622 invoked from network); 28 Aug 2008 18:04:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Aug 2008 18:04:29 -0000 Received: (qmail 18758 invoked by alias); 28 Aug 2008 18:04:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25539 Received: (qmail 18739 invoked from network); 28 Aug 2008 18:04:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 28 Aug 2008 18:04:23 -0000 Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.184]) by bifrost.dotsrc.org (Postfix) with ESMTP id 8939B801E2B4 for ; Thu, 28 Aug 2008 20:04:16 +0200 (CEST) Received: by gv-out-0910.google.com with SMTP id n40so46729gve.18 for ; Thu, 28 Aug 2008 11:04:15 -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=vhT8dPmV7Od3wSWWup6gDksMgoqGRdz7vncOvbcg4Vw=; b=XwaxW7XvXpxdJbComUHEOOgO7uQB6uqwASyXS/sw7kuwwGMGdNpKRoDxhSbKzLNn32 lC9+YpQsYf1kWyRIbBCSiSJrzNZnrafkugTV704CA3qN1cz59bZ/OaEiPHBeMGyMbIU0 +/vYhvN5evfu4INwKEjaFdt6B0EgxdasCq04g= 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=Yyi9opFsQcZkpdX/qioqa5H5Mb5PoijJ7yQITQPzZ5+8T9J4MTb9Ne3lhSNMPMjIo4 l/TyTIHIMFKQ7K9b/7CUA6EeZBu9e+UqLP39HqkkOs0ViM3uKIjyaWTYwbZ+ZJ+OfB/Y ZydaKvUIZYciJV1e1zESj0Fv0c8DBbxq10c4o= Received: by 10.66.221.19 with SMTP id t19mr3638265ugg.69.1219946654972; Thu, 28 Aug 2008 11:04:14 -0700 (PDT) Received: by 10.210.73.14 with HTTP; Thu, 28 Aug 2008 11:04:14 -0700 (PDT) Message-ID: <237967ef0808281104g1b22c705s662f4f17d8db0b5a@mail.gmail.com> Date: Thu, 28 Aug 2008 20:04:14 +0200 From: "Mikael Magnusson" To: "zsh workers" Subject: Re: PATCH: Fix a bug in _git's clone completion In-Reply-To: <20080828160152.GE6330@fsst.voodoo.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080828160152.GE6330@fsst.voodoo.lan> X-Virus-Scanned: ClamAV 0.92.1/8110/Thu Aug 28 19:43:02 2008 on bifrost X-Virus-Status: Clean 2008/8/28 Frank Terbeck : > There was a backslash missing at a line end, which screwed up things. > > Also, I don't understand the completion after 'git clone --bare '. > It does not give me *any* completions, while I would expect the same > completions as without the --bare option. > > If I do 'git clone --bare -', I only get a small subset of the > remaining options. I don't know what is happening here. No idea here... > Finally, I do not understand why the end of the _arguments call was > done like this: > > [snip] > ':repository:__git_any_repositories' \- > '*:directory:_directories' && ret=0- > [snap] > > ...and not just: '*:repository:__git_any_repositories' && ret 0 > > If someone can explain, please do ahead. :) This is because SYNOPSIS git clone ... [] Ie, you can give an optional argument where to clone to. The * is bogus though. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d6cda20..4a50b39 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1611,14 +1611,14 @@ _git-clean () { '*:file:_files' && ret=0 } -# TODO: The --no-checkout is undocumented. (( $+functions[_git-clone] )) || _git-clone () { - _arguments \ + _arguments -S \ '--bare[make a bare GIT repository]' \ + '--mirror[clone refs into refs/* instead of refs/remotes/origin/*]' \ '(-l --local)'{-l,--local}'[perform a local cloning of a repository]' \ - '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \ + '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \ '--reference[reference repository]:repository:_directories' \ '(-q --quiet)'{-q,--quiet}'[operate quietly]' \ '(-n --no-checkout)'{-n,--no-checkout}'[do not checkout HEAD after clone is complete]' \ @@ -1628,7 +1628,7 @@ _git-clone () { $template_arg \ '--depth[create a shallow clone, given number of revisions deep]: :_guard "[[\:digit\:]]##" depth' \ ':repository:__git_any_repositories' \ - '*:directory:_directories' && ret=0 + ':directory:_directories' && ret=0 } (( $+functions[_git-commit] )) || -- Mikael Magnusson