git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Matteo Bagnolini <matteobagnolini2003@gmail.com>,
	 git@vger.kernel.org, johncai86@gmail.com
Subject: Re: [PATCH v2] t7110: replace `test -f` with `test_path_is_*` helpers
Date: Fri, 03 Jan 2025 08:25:00 -0800	[thread overview]
Message-ID: <xmqqfrlzsw4j.fsf@gitster.g> (raw)
In-Reply-To: <Z3fiREGwXdILl-M1@pks.im> (Patrick Steinhardt's message of "Fri, 3 Jan 2025 14:12:36 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> On Fri, Jan 03, 2025 at 02:00:35PM +0100, Matteo Bagnolini wrote:
>> From: matteobagnolini <matteobagnolini2003@gmail.com>

This must match the author ident on the Signed-off-by: line.

>> `test -f` and `! test -f` do not provide clear error messages when they fail.
>> To enhance debuggability, use `test_path_is_file` and `test_path_is_missing`,
>> which instead provide more informative error messages.
>> 
>> Note that `! test -f` checks if a path is not a file, while
>> `test_path_is_missing` verifies that a path does not exist. In this specific
>> case the tests are meant to check the absence of the path, making
>> `test_path_is_missing` a valid replacement.
>
> Thanks, this version looks good to me.
>
> Patrick

Thanks for writing, and thanks for reviewing.


  reply	other threads:[~2025-01-03 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-01 22:59 [PATCH] t7110: Replace `test -f` and `! test -f` with `test_path_is_file` and `test_path_is_missing` for improved debuggability when failing matteobagnolini
2025-01-03 11:41 ` Patrick Steinhardt
2025-01-03 13:00   ` [PATCH v2] t7110: replace `test -f` with `test_path_is_*` helpers Matteo Bagnolini
2025-01-03 13:12     ` Patrick Steinhardt
2025-01-03 16:25       ` Junio C Hamano [this message]
2025-01-03 17:27         ` Matteo Bagnolini
2025-01-03 18:06           ` Junio C Hamano
2025-01-03 19:07             ` Matteo Bagnolini

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=xmqqfrlzsw4j.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johncai86@gmail.com \
    --cc=matteobagnolini2003@gmail.com \
    --cc=ps@pks.im \
    /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).