From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21098 invoked by alias); 21 Jul 2011 09:06:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29569 Received: (qmail 24002 invoked from network); 21 Jul 2011 09:06:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.41 as permitted sender) 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= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com In-Reply-To: References: Date: Thu, 21 Jul 2011 11:06:34 +0200 X-Google-Sender-Auth: 0IUmllANuNXbXEOHxdUe8eAtg50 Message-ID: Subject: Re: nits with new _git From: Nikolai Weibull To: Mikael Magnusson Cc: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 20, 2011 at 13:28, Nikolai Weibull wrote: > On Fri, Jun 3, 2011 at 23:39, Mikael Magnusson wrote: >> It looks like >> this is a systematic error in the whole _git file, but should be >> easily fixed. _git() itself defines local ret=3D1, then does >> _call_function ret _git-$words[1], then _git-log() in this case sets >> ret=3D0 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=E2=80=99d rather remove all superfluous =E2=9F=A8&& ret=3D0=E2=9F=A9s a= nd add =E2=9F=A8integer ret=3D1=E2=9F=A9 > where appropriate. > > Opinions? I have now updated all functions to use the correct semantics.