Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: nits with new _git
- X-seq: zsh-workers 29572
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Nikolai Weibull <now@xxxxxxxx>
- Subject: Re: nits with new _git
- Date: Thu, 21 Jul 2011 11:57:40 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Ppps/sSQPr0TIbJPM0KjTrfmqIVbrvQNlvFYG75/TvM=; b=uHjt45idbHIy4tGQe6MEYZrAKaIV80M3EHX3df4d2zz/S0xeIKL84qsJUuTzsbLcpy NzNwqcCRMmUzGknX6LGZNMXqWlmLsCO9H5LZ1Cng3G056lfqsLiu7RBEMH/I5dE5cSYI qVFfMssF4UNymnMHuw+N9qsNtOfqoShFVlePE=
- In-reply-to: <CADdV=MsChu+cC0UwmaD25AVNdf3DCAv-8UULG=oR_FhJNxT=bw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BANLkTinV2euaa_w+F7m7U0KMZm1ajYDMUg@mail.gmail.com> <BANLkTikbLN=MTgHsiQeNsbwYXMaJ7GVP+w@mail.gmail.com> <BANLkTi=pMjD5rBJRaZrj5FLWVbndGAMGYg@mail.gmail.com> <CADdV=MsXmL-nN4G+_ip2Y5wO8qQetOZcD-r+543vJNAHm2oLfg@mail.gmail.com> <CADdV=MsChu+cC0UwmaD25AVNdf3DCAv-8UULG=oR_FhJNxT=bw@mail.gmail.com>
On 21 July 2011 11:06, Nikolai Weibull <now@xxxxxxxx> wrote:
> On Wed, Jul 20, 2011 at 13:28, Nikolai Weibull <now@xxxxxxxx> wrote:
>> On Fri, Jun 3, 2011 at 23:39, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>>> It looks like
>>> this is a systematic error in the whole _git file, but should be
>>> easily fixed. _git() itself defines local ret=1, then does
>>> _call_function ret _git-$words[1], then _git-log() in this case sets
>>> ret=0 on success. Sounds good? Not really, because it doesn't return
>>> ret, so then _call_function overwrites ret with something else. The
>>> solution would seem to simply not use _call_function since none of the
>>> helper functions return anything, they just set ret directly.
>>
>> I’d rather remove all superfluous ⟨&& ret=0⟩s and add ⟨integer ret=1⟩
>> where appropriate.
>>
>> Opinions?
>
> I have now updated all functions to use the correct semantics.
Ah, not much time to react, it seems to still work so I'm happy with
this way too. :)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author