zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Nikolai Weibull <now@bitwi.se>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: nits with new _git
Date: Thu, 21 Jul 2011 11:57:40 +0200	[thread overview]
Message-ID: <CAHYJk3Q+TaCBwBmETE-ay8=mBiSkeHfWp-cE6zaOw+S-v8vN3Q@mail.gmail.com> (raw)
In-Reply-To: <CADdV=MsChu+cC0UwmaD25AVNdf3DCAv-8UULG=oR_FhJNxT=bw@mail.gmail.com>

On 21 July 2011 11:06, Nikolai Weibull <now@bitwi.se> wrote:
> On Wed, Jul 20, 2011 at 13:28, Nikolai Weibull <now@bitwi.se> wrote:
>> On Fri, Jun 3, 2011 at 23:39, Mikael Magnusson <mikachu@gmail.com> 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


      reply	other threads:[~2011-07-21 10:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14  1:28 Mikael Magnusson
2011-05-14  1:46 ` Mikael Magnusson
2011-05-14  8:38   ` Nikolai Weibull
2011-05-17 13:02   ` Nikolai Weibull
2011-05-14  3:13 ` build problem with patch level 1.5301 S. Cowles
2011-05-14  4:00   ` Bart Schaefer
2011-05-14 16:22     ` Peter Stephenson
2011-05-17 12:56 ` nits with new _git Nikolai Weibull
2011-05-29 15:11   ` Nikolai Weibull
2011-06-03 21:39   ` Mikael Magnusson
2011-07-20 11:28     ` Nikolai Weibull
2011-07-21  9:06       ` Nikolai Weibull
2011-07-21  9:57         ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3Q+TaCBwBmETE-ay8=mBiSkeHfWp-cE6zaOw+S-v8vN3Q@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=now@bitwi.se \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).