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

[PATCH] t1001: replace 'test -f' with 'test_path_is_file'

From
Rodrigo Carvalho <rodrigorsdc@gmail.com>
Date
May 10, 2025, 23:09 UTC
Message-ID
<20250510230909.65519-1-rodrigorsdc@gmail.com>
'test_path_is_file' is a modern path checking method in Git's development.
 Replace the basic shell command 'test -f' with this approach.
Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>
---
 t/t1001-read-tree-m-2way.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
index 4a88bb9ef0..2e8d9384e1 100755
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -362,7 +362,7 @@ test_expect_success 'a/b (untracked) vs a case setup.' '
 test_expect_success 'a/b (untracked) vs a, plus c/d case test.' '
 	read_tree_u_must_fail -u -m "$treeH" "$treeM" &&
 	git ls-files --stage &&
-	test -f a/b
+	test_path_is_file a/b
 '
 
 test_expect_success 'read-tree supports the super-prefix' '
-- 
2.43.0
Next: Junio C Hamano
Message 1 of 2 in “t1001: replace 'test -f' with 'test_path_is_file'”
  1. t1001: replace 'test -f' with 'test_path_is_file'Rodrigo Carvalho, May 10, 2025
  2. Junio C HamanoMay 12, 2025

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.