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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 73D4920248 for ; Tue, 26 Feb 2019 19:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728658AbfBZTwY (ORCPT ); Tue, 26 Feb 2019 14:52:24 -0500 Received: from mout.gmx.net ([212.227.17.22]:38709 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728341AbfBZTwX (ORCPT ); Tue, 26 Feb 2019 14:52:23 -0500 Received: from [192.168.0.129] ([37.201.195.16]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M8ZtH-1hC6zK2qKx-00wGrg; Tue, 26 Feb 2019 20:52:17 +0100 Date: Tue, 26 Feb 2019 20:52:01 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Rohit Ashiwal cc: =?UTF-8?Q?Martin_=C3=85gren?= , Rohit Ashiwal via GitGitGadget , Git Mailing List , Junio C Hamano , pclouds@gmail.com Subject: Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-628463197-1551210737=:41" X-Provags-ID: V03:K1:8aprm0fo0dweCJRLQEddA/cVo8IffZBSbwuZcAQ0NCz3Nav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YH4oDRHF+DgybQveqtYOR3a/QLRU0nTvqW80 PjPWr5nYfKGr+g04WP/Zr/c8U3ld9FKQjM81ozNeWDx0WFMmMCIzeq7KW4xFG4wOo8y74m/tR voYjiBn+W2w== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-628463197-1551210737=:41 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Hi, On Tue, 26 Feb 2019, Rohit Ashiwal wrote: > Hi Martin > > On Tue, Feb 26, 2019 at 10:01 PM Martin Ă…gren wrote: > > > > > - ! test -d submod && > > > + ! test_path_is_dir submod && > > > > Now, here I wonder. This (and other changes like this) means that every > > time the test passes, we see "Directory submod doesn't exist.", which is > > perhaps not too irritating. But more importantly, when the test fails, > > we don't get any hint. So a failure is just as silent and "non-helpful" > > as before. I can think of a few approaches: > > > > > 1 Teach `test_path_is_dir` and friends to handle "!" in a clever way, and > > write these as `test_path_is_dir ! foo`. (We already have helpers > > that do this, see, e.g., `test_i18ngrep`.) > > > > Yes, I also think that it should be corrected and I think this(1) > approach is good as it resonates well with the existing code. I'll > start working on it and submit the patch as soon as possible. We already have `test_path_is_missing`. Why not use that instead of `! test -d` or `! test -f`? Ciao, Johannes --8323328-628463197-1551210737=:41--