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 25509
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: _git: Update __git_merge_strategies to work with new git.
- Date: Fri, 22 Aug 2008 17:41:39 +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=dpLnX07tNarlNNXCiha1+xOcjFsy9S7o0y6FjE7Ik5U=; b=X6IChTicWUTOFTxePSmYoc5vyg6zUDM5Ijmn9zRndEriE4M6aYsS/AAwyM8c4rBhZN NGI5HNzNEMELtGbW8off1HeB0TiN6/37H5XksWJ+Kd4vcrxxTLG5rGSXEu0pFBSThZST J8ndW0z1TUbNUZAPzibC/5sACWs/j9FeBEL48=
- 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=ixhNzaCYhiWcfHEinYpRWVbnSguOq+aSpKmScB50A2c3NOVKQMiv8SBZHDj+0MNun+ SZ2YsoQB6amdJduOXfq2ZzBInhBOr66Wslj6EfoeAlfjy8pvBVprPPNCe2non9wctoRZ kC28gEwIt3oBxXp5Hew9HEtpGSKUilF4r5rpo=
- In-reply-to: <20080822103622.GA31581@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0808210443y542c4794v50c5ea0eb1a308f@xxxxxxxxxxxxxx> <20080821122947.GA4065@xxxxxxxx> <237967ef0808211319u42388b15w330c324e3f8043e@xxxxxxxxxxxxxx> <20080822103622.GA31581@xxxxxxxx>
2008/8/22 Clint Adams <clint@xxxxxxx>:
> On Thu, Aug 21, 2008 at 10:19:18PM +0200, Mikael Magnusson wrote:
>> 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.
>
> Doesn't do anything with my version.
>
>> So it should be
>> merge_strategies_cache=(${(s: :)${${${${(f)"$(git merge -s ''
>> 2>&1)"}[(r)[Aa]vailable strategies are: *,(r)]}%%.}##*: }})
>
> Gives me a blank array.
>
> Maybe this:
>
> ${(s: :)${${(M)${(f)"$(git merge -s '' 2>&1)"}:#[Aa]vailable strategies are: *}#[Aa]vailable strategies are: }%.}
That doesn't grab the custom strategies line... How about this? Sort
of a hack though... :)
${(s: :)${${${${(f)"$(echo; git merge -s '' 2>&1)"}[(r)[Aa]vailable
strategies are: *,(r)]}%%.}##*: }}
::Some minutes later::
Aha, my first version didn't work for you because it's only one line, so the
(f) doesn't give you an array:
% echo ${${(f)"$(echo available strategies are: recur recursive
octopus resolve stupid ours subtree)"}[(r)[Aa]vailable strategies are:
*]}
a
I've no idea if you can force an array in a better way than with the echo
though.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author