Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: nits with new _git

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