{"thread":{"id":"63438","subject":"[PATCH] t1001: replace 'test -f' with 'test_path_is_file'","startedAt":"2025-05-10T23:12:16Z","lastAt":"2025-05-12T17:09:14Z","messageCount":2,"participants":["Rodrigo Carvalho","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"517767","messageId":"20250510230909.65519-1-rodrigorsdc@gmail.com","threadId":"63438","inReplyTo":null,"subject":"[PATCH] t1001: replace 'test -f' with 'test_path_is_file'","fromName":"Rodrigo Carvalho","fromEmail":"rodrigorsdc@gmail.com","sentAt":"2025-05-10T23:09:09Z","receivedAt":"2025-05-10T23:12:16Z","isPatch":true,"sender":{"key":"rodrigorsdc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701582?v=4"},"body":"'test_path_is_file' is a modern path checking method in Git's development.\n Replace the basic shell command 'test -f' with this approach.\n\nSigned-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>\n---\n t/t1001-read-tree-m-2way.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh\nindex 4a88bb9ef0..2e8d9384e1 100755\n--- a/t/t1001-read-tree-m-2way.sh\n+++ b/t/t1001-read-tree-m-2way.sh\n@@ -362,7 +362,7 @@ test_expect_success 'a/b (untracked) vs a case setup.' '\n test_expect_success 'a/b (untracked) vs a, plus c/d case test.' '\n \tread_tree_u_must_fail -u -m \"$treeH\" \"$treeM\" &&\n \tgit ls-files --stage &&\n-\ttest -f a/b\n+\ttest_path_is_file a/b\n '\n \n test_expect_success 'read-tree supports the super-prefix' '\n-- \n2.43.0\n\n"},{"id":"517876","messageId":"xmqqldr1u56w.fsf@gitster.g","threadId":"63438","inReplyTo":"20250510230909.65519-1-rodrigorsdc@gmail.com","subject":"Re: [PATCH] t1001: replace 'test -f' with 'test_path_is_file'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T17:09:11Z","receivedAt":"2025-05-12T17:09:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Rodrigo Carvalho <rodrigorsdc@gmail.com> writes:\n\n> 'test_path_is_file' is a modern path checking method in Git's development.\n>  Replace the basic shell command 'test -f' with this approach.\n>\n> Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com>\n> ---\n>  t/t1001-read-tree-m-2way.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh\n> index 4a88bb9ef0..2e8d9384e1 100755\n> --- a/t/t1001-read-tree-m-2way.sh\n> +++ b/t/t1001-read-tree-m-2way.sh\n> @@ -362,7 +362,7 @@ test_expect_success 'a/b (untracked) vs a case setup.' '\n>  test_expect_success 'a/b (untracked) vs a, plus c/d case test.' '\n>  \tread_tree_u_must_fail -u -m \"$treeH\" \"$treeM\" &&\n>  \tgit ls-files --stage &&\n> -\ttest -f a/b\n> +\ttest_path_is_file a/b\n>  '\n\nObviously correct conversion.\n\nThis is an ancient part of the system, started before we even had a\n\"git checkout\" rewritten as a single command, so it is not\nsurprising if it had quite a lot of antiquities and debugging\nstatement without much effect, which may be subject to further\nclean-up.\n\nThanks, will queue.\n\n"}]}