From: Junio C Hamano <gitster@pobox.com>
To: Vincenzo Mezzela <vincenzo.mezzela@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file)
Date: Mon, 11 Mar 2024 09:32:33 -0700 [thread overview]
Message-ID: <xmqqr0ggu3tq.fsf@gitster.g> (raw)
In-Reply-To: <20240310114311.598681-2-vincenzo.mezzela@gmail.com> (Vincenzo Mezzela's message of "Sun, 10 Mar 2024 12:43:11 +0100")
Vincenzo Mezzela <vincenzo.mezzela@gmail.com> writes:
> Replace use of 'test -f' with 'test_path_is_file' helper functions from
Before "helper functions", we'd need another pair, e.g.
and 'test ! -f' with 'test_path_is_missing'
otherwise the plurals in the remainder of the paragraph would not
make much sense.
> test-lib-functions.sh. These functions perform identical operations
> while enhancing debugging capabilities in case of test failures.
>
> In the context of this file, 'test ! -f' is meant to check if the file
> has been correctly cleaned, so it should be 'test ! -e'.
> Thus its usage is replaced with 'test_path_is_missing' instead of
> '! test_path_is_file'.
Even if the test meant not to complain when there is something not a
regular file (e.g. a directory), "! test_path_is_file" is not the
right way to express it, so the way this paragraph is written is
somewhat misleading. Something like
The original used `test ! -f` but it did not mean that the tests
are happy if a directory exists there. It should have used
`test ! -e`, and using test_path_is_missing matches the intent.
perhaps.
prev parent reply other threads:[~2024-03-11 16:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 17:22 [GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-02-19 17:22 ` [GSOC][RFC PATCH 1/1] t: t7301-clean-interactive: Use test_path_is_(missing|file) Vincenzo Mezzela
2024-02-26 10:13 ` Christian Couder
2024-02-19 19:36 ` [GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts Eric Sunshine
2024-02-27 16:17 ` [GSOC][PATCH v2 " Vincenzo Mezzela
2024-02-27 16:17 ` [GSOC][PATCH v2 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-04 9:31 ` Patrick Steinhardt
2024-03-04 17:17 ` [GSOC][PATCH v3 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-03-04 17:17 ` [GSOC][PATCH v3 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-04 21:50 ` Junio C Hamano
2024-03-04 23:53 ` Eric Sunshine
2024-03-10 11:43 ` [GSOC][PATCH v4 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-03-10 11:43 ` [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-11 16:32 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr0ggu3tq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=vincenzo.mezzela@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.
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).