From: "Shashank S 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>,
Shashank S <shashu8660@gmail.com>,
Shashank <shashu8660@gmail.com>
Subject: [PATCH v2] [Outreachy] t0081: modernize the code testing whether a file exists
Date: Thu, 15 Oct 2026 10:47:16 +0000 [thread overview]
Message-ID: <pull.2254.v2.git.1792061236183.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2254.git.1791962806807.gitgitgadget@gmail.com>
From: Shashank <shashu8660@gmail.com>
Replace the old-style shell `test -f` command with Git's modern
`test_path_is_file`.
Signed-off-by: Shashank <shashu8660@gmail.com>
---
[outreachy] t0081: Replace the old style 'test -f' to new
'test_path_is_file'
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2254%2Fshashu8660%2Fupdate-t0081-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2254/shashu8660/update-t0081-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2254
Range-diff vs v1:
1: 906c628765 ! 1: d4807f2751 t0081: modernize the code testing whether a file exists
@@ Metadata
Author: Shashank <shashu8660@gmail.com>
## Commit message ##
- t0081: modernize the code testing whether a file exists
+ [Outreachy] t0081: modernize the code testing whether a file exists
Replace the old-style shell `test -f` command with Git's modern
`test_path_is_file`.
- This instance was found using:
- `git grep "test -[efd]" t/'
-
Signed-off-by: Shashank <shashu8660@gmail.com>
## t/t0081-find-pack.sh ##
t/t0081-find-pack.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t0081-find-pack.sh b/t/t0081-find-pack.sh
index ff9d56fbf1..7d5082c487 100755
--- a/t/t0081-find-pack.sh
+++ b/t/t0081-find-pack.sh
@@ -32,7 +32,7 @@ test_expect_success 'repack everything into a single packfile' '
".git/objects/pack/pack-"*".pack") true ;;
*) false ;;
esac &&
- test -f "$head_commit_pack" &&
+ test_path_is_file "$head_commit_pack" &&
# Everything is in the same pack
test "$head_commit_pack" = "$head_tree_pack" &&
base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
--
gitgitgadget
prev parent reply other threads:[~2026-10-15 10:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 7:26 [PATCH] t0081: modernize the code testing whether a file exists Shashank S via GitGitGadget
2026-10-14 9:49 ` Usman Akinyemi
2026-10-14 21:47 ` Junio C Hamano
2026-10-15 7:02 ` Shashank S
2026-10-15 11:43 ` Kaartic Sivaraam
2026-10-15 17:10 ` Junio C Hamano
2026-10-15 6:51 ` Shashank S
2026-10-15 10:47 ` Shashank S via GitGitGadget [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=pull.2254.v2.git.1792061236183.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.com \
--cc=shashu8660@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.