From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23611 invoked from network); 21 Aug 2008 20:21:09 -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 20:21:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 79607 invoked from network); 21 Aug 2008 20:20:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Aug 2008 20:20:52 -0000 Received: (qmail 27402 invoked by alias); 21 Aug 2008 20:20:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25504 Received: (qmail 26915 invoked from network); 21 Aug 2008 20:19:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 21 Aug 2008 20:19:22 -0000 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by bifrost.dotsrc.org (Postfix) with ESMTP id DC9ED801E2B4 for ; Thu, 21 Aug 2008 22:19:18 +0200 (CEST) Received: by ug-out-1314.google.com with SMTP id 29so85125ugo.18 for ; Thu, 21 Aug 2008 13:19:18 -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=u3TfJmOl1Bq6o+FQ7GTTGfz2WrqLDvhlSm0Jn7nZIOk=; b=kTGWswegms1t21TYVdgdhzbHVKEXRm2SI4msnbifj83qg9G9NGrpo06uZ1tHqM4nRv A+KzOINE0PKplQm2CacXzbpP9NptsDKI3y3XWpc4EN/ZVg8LSyFhBQl8QEm6tNHKunTn BTpQKAJfxnWCjnV1daUSp/RnaOmv5eCqKfKAs= 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=PhwZ12fFx7UXIZ23SkZv+U92RwmUgCTqVQxVbuT5R/CwaQq9iCmOyWOC8gThJXc9sO Fgc66bFBhyP0HV2PyZHJrdcUP/nfU6Tda9HxU82YqLdLf/Gt4Aiw7eSncRTIKwPBogIB 4vx+eDs+cvzLmG5VU5o9JYwLO1gSweRbcF49o= Received: by 10.210.11.13 with SMTP id 13mr240164ebk.142.1219349958792; Thu, 21 Aug 2008 13:19:18 -0700 (PDT) Received: by 10.210.19.20 with HTTP; Thu, 21 Aug 2008 13:19:18 -0700 (PDT) Message-ID: <237967ef0808211319u42388b15w330c324e3f8043e@mail.gmail.com> Date: Thu, 21 Aug 2008 22:19:18 +0200 From: "Mikael Magnusson" To: zsh-workers Subject: Re: _git: Update __git_merge_strategies to work with new git. In-Reply-To: <20080821122947.GA4065@scru.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0808210443y542c4794v50c5ea0eb1a308f@mail.gmail.com> <20080821122947.GA4065@scru.org> X-Virus-Scanned: ClamAV 0.92.1/8069/Thu Aug 21 19:36:55 2008 on bifrost X-Virus-Status: Clean 2008/8/21 Clint Adams : > On Thu, Aug 21, 2008 at 01:43:15PM +0200, Mikael Magnusson wrote: >> - merge_strategies_cache=(${${=${${(M)${(f)"$(<$(git >> --exec-path)/git-merge)"}:#all_strategies*}##all_strategies=\'}%%\'}:#recur}) >> + merge_strategies_cache=(${(s: :)${${${${(ps:\n:)"$(git merge -s '' >> 2>&1)"}[(r)Available strategies are: *,(r)]}%%.}##*: }}) > > With 1.5.6.3 I get no capital A: Ah, I knew i forgot something. It changed a bit in 1.6.0. The a -> A and the trailing dot after the strategies. > % git merge -s '' > available strategies are: recur recursive octopus resolve stupid ours subtree > > Also (ps:\n:) can be written as (f), but is the output ever more than > one line? Yes, touch /usr/local/bin/git-merge-clint and +x it: % git merge -s '' Could not find merge strategy ''. Available strategies are: file octopus ours recursive resolve subtree. Available custom strategies are: mikachu. % It is also "future-proofed" against something like this, same as the sed script: % git merge -s '' Could not find merge strategy ''. Available strategies are: file octopus ours recursive resolve subtree. Available custom strategies are: mikachu. Make sure you spell strategy names correctly. % > See if > > merge_strategies_cache=(${=${${"$(git merge -s '' 2>&1)"}#[Aa]vailable strategies are: }}) > > does the right thing for you. So it should be merge_strategies_cache=(${(s: :)${${${${(f)"$(git merge -s '' 2>&1)"}[(r)[Aa]vailable strategies are: *,(r)]}%%.}##*: }}) -- Mikael Magnusson