Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: nits with new _git
- X-seq: zsh-workers 29569
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: nits with new _git
- Date: Thu, 21 Jul 2011 11:06:34 +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:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2Re6Q2Zi7a7WhzfuQT/HzVDLD4ma2EmwmkAqDYkw8vI=; b=H4yEqOJBM+SiNgfnLPMOlI+ZSgLWnh/uh2ZEVqMJT9DvyQrW05gZuTsizWf55FUgTi nYAbQBSMqXNaPGeDCEPVD1TwsNpbBnPF0hk3HRXweGaWB5OWiUH4ixhAJQgNMsBeifAI 6ksw51MPnw2SQynmGg5NW+OPMX25Rz+/0R9X4=
- In-reply-to: <CADdV=MsXmL-nN4G+_ip2Y5wO8qQetOZcD-r+543vJNAHm2oLfg@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>
- Sender: nikolai.weibull@xxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author