Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _git: Update __git_merge_strategies to work with new git.
- X-seq: zsh-workers 25504
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: _git: Update __git_merge_strategies to work with new git.
- Date: Thu, 21 Aug 2008 22:19:18 +0200
- 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=
- In-reply-to: <20080821122947.GA4065@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0808210443y542c4794v50c5ea0eb1a308f@xxxxxxxxxxxxxx> <20080821122947.GA4065@xxxxxxxx>
2008/8/21 Clint Adams <clint@xxxxxxx>:
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author