From: Doron Behar <doron.behar@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH 1/1] Squashed commit of the following:
Date: Thu, 7 Jun 2018 19:20:41 +0300 [thread overview]
Message-ID: <20180607162041.esnzh5cgopobtvfz@NUC.doronbehar.com> (raw)
In-Reply-To: <18086.1528387199@thecus>
On Thu, Jun 07, 2018 at 05:59:59PM +0200, Oliver Kiddle wrote:
> Doron Behar wrote:
> > The idea with the 1st condition that tests the existence of the
> > manifests files, is that if non of them exists (which usually never
> > happens if luarocks is installed properly), is that only one of them is
> > needed for continuing with the modification date of them vs the cache
> > file..
>
> Okay, that makes sense.
>
> > local cache_status=1
> > if [[ -f ${cache_file} ]]; then
> > if [[ -f ${user_manifest_file} ]]; then
> > if [[ ${user_manifest_file} -nt ${cache_file} ]]; then
> > cache_status=0
> > fi
> > fi
> > if [[ -f ${system_manifest_file} ]]; then
> > if [[ ${system_manifest_file} -nt ${cache_file} ]]; then
> > cache_status=0
> > else
> > cache_status=1
>
> As you've initialised cache_status to 1, this else branch is
> superfluous.
>
Correct, all of these ones and zeros negativity probably confused me..
> > fi
> > fi
> > fi
> > return cache_status
> >
> > Better?
>
> Yes. Much more readable.
>
> I look forward to the final function.
>
> Oliver
Sending right away.
prev parent reply other threads:[~2018-06-07 16:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 16:14 [PATCH 0/1] *** Add luarocks completion *** doron.behar
2018-05-26 16:14 ` [PATCH 1/1] Squashed commit of the following: doron.behar
2018-05-28 10:48 ` Oliver Kiddle
2018-05-29 15:38 ` Doron Behar
2018-05-29 22:00 ` Oliver Kiddle
2018-05-30 12:47 ` Doron Behar
2018-05-30 15:43 ` Oliver Kiddle
2018-06-01 7:18 ` Doron Behar
2018-06-01 13:30 ` Doron Behar
2018-06-01 22:45 ` Oliver Kiddle
2018-06-03 21:46 ` Daniel Shahaf
2018-06-05 15:41 ` Doron Behar
2018-06-07 15:59 ` Oliver Kiddle
2018-06-07 16:20 ` Doron Behar [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=20180607162041.esnzh5cgopobtvfz@NUC.doronbehar.com \
--to=doron.behar@gmail.com \
--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).