From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Marcelo Machado Lage <marcelomlage@usp.br>,
git@vger.kernel.org, Vinicius Lira de Freitas <vinilira@usp.br>
Subject: Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'
Date: Fri, 03 Jul 2026 13:48:03 -0700 [thread overview]
Message-ID: <xmqqfr1zhkak.fsf@gitster.g> (raw)
In-Reply-To: <akdwp_a2EuhVoGVW@pks.im> (Patrick Steinhardt's message of "Fri, 3 Jul 2026 10:19:51 +0200")
Patrick Steinhardt <ps@pks.im> writes:
>> - test -f f1 && test -f f2 && test -f file_with_\$metachar &&
>> + test_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\$metachar &&
>
> While at it we could split this line into three lines -- it's getting
> overly long, and we typically don't chain multiple commands on one line
> nowadays.
Excellent.
>> - ! test -f main/f10 &&
>> + test_path_is_missing main/f10 &&
>
> This is a stronger guarantee compared to before, as we only checked
> whether the path is not a file. Now we verify that it doesn't exist at
> all, which would be equivalent to `test -e`. That's a strict improvement
> though, but may be worth pointing out in the commit message so that the
> reviewer is not surprised.
Good.
next prev parent reply other threads:[~2026-07-03 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 14:07 [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*' Marcelo Machado Lage
2026-07-03 8:19 ` Patrick Steinhardt
2026-07-03 20:48 ` Junio C Hamano [this message]
2026-07-06 15:00 ` Marcelo Machado Lage
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=xmqqfr1zhkak.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=marcelomlage@usp.br \
--cc=ps@pks.im \
--cc=vinilira@usp.br \
/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