From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 8318B1F953 for ; Mon, 13 Dec 2021 16:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241012AbhLMQpy convert rfc822-to-8bit (ORCPT ); Mon, 13 Dec 2021 11:45:54 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:42781 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234892AbhLMQpx (ORCPT ); Mon, 13 Dec 2021 11:45:53 -0500 Received: by mail-pf1-f177.google.com with SMTP id u80so15415389pfc.9 for ; Mon, 13 Dec 2021 08:45:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uoG/4ku3t5dEtqjs1PZItqHbEDxRRjt8HnnfVMbtPZ0=; b=FJc946ckuSCmwx5CnpyNiFa1on28f5xt1fYCEou8nxdYbYKYcb4UCwuZBnHs7fEOWw hHFhJyPGDJY+AR4A4RSz3QbTMX+tKxqvC90VmD/pUuih+O/m64DK24JkOWO/NSh1JV7U +LuuL3OBhrB0ANqi+GbNu5huHGXa/pgKzwmG6bJayNh/6h4CfeQr50eqWHnWjDZMHTP1 t9ycP2GkBcNXKZeKi4hxKSUzdo0O2e2DLFuJIW9tLwiuHCw1c8yK7feYZwovqVhIzeVZ Mf3YngQI4BRXLMZ9lGP0i4czvnCgbR2kYPmJcNAltIeCKil3x/k6KW8niz3AtJGH7FYD UMdA== X-Gm-Message-State: AOAM530SrtJE2oepqkwONl3ADSDGUt4RPMVyCX+oS4Ea6P+ah49kHWQp Udzlvymd5iNMav2XVkOgvpJNyugtZoyyO5X67yU= X-Google-Smtp-Source: ABdhPJzPhOJlquq/ZO6fzK/g12KNmYwIamvIuHUoPAaTBhU0mKrzkFSJGYAh8ac/lfCR3wLgCu3l8i2NWUiPidLxcHk= X-Received: by 2002:a63:380e:: with SMTP id f14mr52346942pga.227.1639413953307; Mon, 13 Dec 2021 08:45:53 -0800 (PST) MIME-Version: 1.0 References: <211213.868rwo8o3q.gmgdl@evledraar.gmail.com> In-Reply-To: <211213.868rwo8o3q.gmgdl@evledraar.gmail.com> From: Eric Sunshine Date: Mon, 13 Dec 2021 11:45:42 -0500 Message-ID: Subject: Re: [PATCH 10/13] test-lib-functions: add and use a "write_hook" wrapper To: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Cc: Git List , Junio C Hamano , Derrick Stolee , Adam Spiers , Jeff King , Johannes Schindelin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Dec 13, 2021 at 11:29 AM Ævar Arnfjörð Bjarmason wrote: > On Mon, Dec 13 2021, Eric Sunshine wrote: > > It's not clear whether the intention is to maintain the &&-chain in > > this function... > > ... or not care about it since it's broken here before `shift`... > > Thanks, those should all use &&-chaining. Will fix. By the way, the new chainlint could be made to catch broken &&-chains (and missing `|| return 1`) in test script functions, as well; it doesn't have to limit its checks only to tests. The reason I haven't done so yet is that it's not clear how much we care about &&-chains in functions, especially since we have _so many_ functions which don't maintain the &&-chain. In the long run, I think it might be beneficial to extend chainlint to check shell functions too, but fixing the &&-chains in functions probably have to be done incrementally, thus would likely require some sort of whitelisting or blacklisting mechanism until all functions have been fixed. Anyhow, it's food for thought.