git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t5315: use test_path_is_file for loose-object check

From
Bilal El Khatabi <elkhatabibilal@gmail.com>
Date
Mar 19, 2026, 16:02 UTC
Message-ID
<20260319160301.98039-1-elkhatabibilal@gmail.com>
From: bilalobe <elkhatabibilal@gmail.com>

Replace an assertion-style `test -f` check with `test_path_is_file` in `t/t5315-pack-objects-compression.sh`.

This aligns the test with the path-checking helpers used in Git's test suite.

Found with:
  git grep "test -[efd]" t/
Signed-off-by: bilalobe <elkhatabibilal@gmail.com>
---
 t/t5315-pack-objects-compression.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t5315-pack-objects-compression.sh b/t/t5315-pack-objects-compression.sh
index 8bacd96275..d0feab17b4 100755
--- a/t/t5315-pack-objects-compression.sh
+++ b/t/t5315-pack-objects-compression.sh
@@ -10,7 +10,7 @@ test_expect_success setup '
 	# make sure it resulted in a loose object
 	ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
 	ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
-	test -f .git/objects/$ob/$ject
+	test_path_is_file .git/objects/$ob/$ject
 '
 
 while read expect config
-- 
2.53.0
Next: Pablo
Message 1 of 7 in “t5315: use test_path_is_file for loose-object check”
  1. t5315: use test_path_is_file for loose-object checkBilal El Khatabi, Mar 19, 2026
  2. PabloMar 19, 2026
  3. Junio C HamanoMar 19, 2026
  4. t5315: use test_path_is_file for loose-object checkBilal El Khatabi, Mar 19, 2026
  5. Junio C HamanoMar 19, 2026
  6. BILAL EL KHATABIMar 19, 2026
  7. Karthik NayakMar 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.