From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21025 invoked by alias); 7 Jun 2018 16:10:23 -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: List-Unsubscribe: X-Seq: 42945 Received: (qmail 4479 invoked by uid 1010); 7 Jun 2018 16:10:23 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.4/5.0):. Processed in 1.194438 secs); 07 Jun 2018 16:10:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=H1tn=IZ=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1528387801; bh=WsayzYcir0C7EaV7sqWySypuzukQPywS4yPBTdRrUUI=; h=From:References:To:Subject:Date:From:Subject; b=OEYUzAuOvnVVgGjtVSM/lnCJ3EeOb4LKKiQrytbfT4QWheqPUlm/TOCmYK6cnACu5uRpMQQqf6gCuaW7cJw3fBXoHNJyfNEKxfaDUHFf/HtVyLJpOIp75AT63sDy188u8u4tAiZj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7iNwX_f7MagS680U9A4S JXHUIYvI8ORw24wUN9BcZ5nxPxyLfNZNUyowgNzRNyvQEk68qTnUP6omIBfoOcrkh cc: Doron Behar In-reply-to: <20180605154121.tfrw6oheq3ce6qkr@NUC.doronbehar.com> From: Oliver Kiddle References: <20180526161403.4860-1-doron.behar@gmail.com> <20180526161403.4860-2-doron.behar@gmail.com> <5942.1527504539@thecus> <20180529153821.nmwa5yojlusioxti@NUC.doronbehar.com> <13666.1527631249@thecus> <20180530124707.xp6loetwnplkypk2@NUC.doronbehar.com> <16604.1527694987@thecus> <20180601071850.4z3h6cvkuvva3nby@NUC.doronbehar.com> <20180601133048.m7crvdzodzntxcsq@NUC.doronbehar.com> <31972.1527893117@thecus> <20180605154121.tfrw6oheq3ce6qkr@NUC.doronbehar.com> To: zsh-workers@zsh.org Subject: Re: [PATCH 1/1] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18085.1528387199.1@thecus> Date: Thu, 07 Jun 2018 17:59:59 +0200 Message-ID: <18086.1528387199@thecus> 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. > fi > fi > fi > return cache_status > > Better? Yes. Much more readable. I look forward to the final function. Oliver