From: Shashank S via GitGitGadget Date: Thu, 15 Oct 2026 10:47:16 GMT Subject: [PATCH v2] [Outreachy] t0081: modernize the code testing whether a file exists Message-ID: In-Reply-To: From: Shashank Replace the old-style shell `test -f` command with Git's modern `test_path_is_file`. Signed-off-by: Shashank --- [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 ## 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 ## 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