From: "Roger Koranteng via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>,
Christian Couder <christian.couder@gmail.com>,
Siddharth Asthana <siddharthasthana31@gmail.com>,
Usman Akinyemi <usmanakinyemi202@gmail.com>,
Roger Koranteng <rogerkorantenng@gmail.com>,
Roger Koranteng <rogerkorantenng@gmail.com>
Subject: [PATCH] t5301: use test_path_is_file instead of test -f
Date: Tue, 20 Oct 2026 09:26:27 +0000 [thread overview]
Message-ID: <pull.2269.git.1792488388022.gitgitgadget@gmail.com> (raw)
From: Roger Koranteng <rogerkorantenng@gmail.com>
Replace raw 'test -f' assertions with the 'test_path_is_file' helper,
which gives diagnostic output when the assertion fails.
Signed-off-by: Roger Koranteng <rogerkorantenng@gmail.com>
---
t5301: use test_path_is_file instead of test -f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2269%2Frogerkorantenng%2Ft5301-modernize-path-checks-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2269/rogerkorantenng/t5301-modernize-path-checks-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2269
t/t5301-sliding-window.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh
index 3c3666b278..b6868229bf 100755
--- a/t/t5301-sliding-window.sh
+++ b/t/t5301-sliding-window.sh
@@ -22,7 +22,7 @@ test_expect_success 'setup' '
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack1=$(ls .git/objects/pack/*.pack) &&
- test -f "$pack1"
+ test_path_is_file "$pack1"
'
test_expect_success 'verify-pack -v, defaults' '
@@ -48,7 +48,7 @@ test_expect_success 'repack -a -d, packedGit{WindowSize,Limit} == 1 page' '
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack2=$(ls .git/objects/pack/*.pack) &&
- test -f "$pack2" &&
+ test_path_is_file "$pack2" &&
test "$pack1" \!= "$pack2"
'
base-commit: c51408889c3b372814bc20b9431c3b74d0d268eb
--
gitgitgadget
reply other threads:[~2026-10-20 9:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=pull.2269.git.1792488388022.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.com \
--cc=rogerkorantenng@gmail.com \
--cc=siddharthasthana31@gmail.com \
--cc=usmanakinyemi202@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