git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Shubham Verma <shubhunic@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t9801: replace test -f with test_path_is_file
Date: Wed, 03 Mar 2021 17:11:28 -0800	[thread overview]
Message-ID: <xmqq8s73g1tr.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20210302185056.65929-1-shubhunic@gmail.com> (Shubham Verma's message of "Wed, 3 Mar 2021 00:20:56 +0530")

Shubham Verma <shubhunic@gmail.com> writes:

> -		test -f file1 &&
> -		test -f file2 &&
> +		test_path_is_file file1 &&
> +		test_path_is_file file2 &&
>  		test ! -f file3 &&

You chose not to touch the last one, which is the right thing to do.
Replacing "test -f P" with "test_path_is_file P" can be done
mechanically, but it takes understanding of what the test is doing
to come up the correct replacement for "test ! -f P".  It may be
expecting P to be a directory, or it may be expecting P to be
missing, for example.

Will queue.  Thanks.


      reply	other threads:[~2021-03-04  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 18:50 [PATCH] t9801: replace test -f with test_path_is_file Shubham Verma
2021-03-04  1:11 ` Junio C Hamano [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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8s73g1tr.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=shubhunic@gmail.com \
    /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://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).