{"thread":{"id":"62924","subject":"[GSoC][PATCH] t7603: replace test -f by test_path_is_file","startedAt":"2025-02-08T16:57:44Z","lastAt":"2025-02-10T06:49:02Z","messageCount":2,"participants":["Lucas Oshiro","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"512135","messageId":"20250208165731.78804-1-lucasseikioshiro@gmail.com","threadId":"62924","inReplyTo":null,"subject":"[GSoC][PATCH] t7603: replace test -f by test_path_is_file","fromName":"Lucas Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-02-08T16:57:31Z","receivedAt":"2025-02-08T16:57:44Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"`test_path_is_file` provides a better output when asserting whether a\nfile exists. Replace the occurrences of `test -f` in 7603 by it,\nfacilitating the trace of possible test fails.\n\nSigned-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>\n---\n t/t7603-merge-reduce-heads.sh | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/t/t7603-merge-reduce-heads.sh b/t/t7603-merge-reduce-heads.sh\nindex 4887ca705b..1f8c3b7ccb 100755\n--- a/t/t7603-merge-reduce-heads.sh\n+++ b/t/t7603-merge-reduce-heads.sh\n@@ -52,12 +52,12 @@ test_expect_success 'merge c1 with c2, c3, c4, c5' '\n \ttest \"$(git rev-parse c3)\" = \"$(git rev-parse HEAD^3)\" &&\n \ttest \"$(git rev-parse c5)\" = \"$(git rev-parse HEAD^4)\" &&\n \tgit diff --exit-code &&\n-\ttest -f c0.c &&\n-\ttest -f c1.c &&\n-\ttest -f c2.c &&\n-\ttest -f c3.c &&\n-\ttest -f c4.c &&\n-\ttest -f c5.c &&\n+\ttest_path_is_file c0.c &&\n+\ttest_path_is_file c1.c &&\n+\ttest_path_is_file c2.c &&\n+\ttest_path_is_file c3.c &&\n+\ttest_path_is_file c4.c &&\n+\ttest_path_is_file c5.c &&\n \tgit show --format=%s -s >actual &&\n \t! grep c1 actual &&\n \tgrep c2 actual &&\n@@ -75,12 +75,12 @@ test_expect_success 'pull c2, c3, c4, c5 into c1' '\n \ttest \"$(git rev-parse c3)\" = \"$(git rev-parse HEAD^3)\" &&\n \ttest \"$(git rev-parse c5)\" = \"$(git rev-parse HEAD^4)\" &&\n \tgit diff --exit-code &&\n-\ttest -f c0.c &&\n-\ttest -f c1.c &&\n-\ttest -f c2.c &&\n-\ttest -f c3.c &&\n-\ttest -f c4.c &&\n-\ttest -f c5.c &&\n+\ttest_path_is_file c0.c &&\n+\ttest_path_is_file c1.c &&\n+\ttest_path_is_file c2.c &&\n+\ttest_path_is_file c3.c &&\n+\ttest_path_is_file c4.c &&\n+\ttest_path_is_file c5.c &&\n \tgit show --format=%s -s >actual &&\n \t! grep c1 actual &&\n \tgrep c2 actual &&\n-- \n2.47.1\n\n"},{"id":"512167","messageId":"Z6mhU50bt5iYVuZ8@pks.im","threadId":"62924","inReplyTo":"20250208165731.78804-1-lucasseikioshiro@gmail.com","subject":"Re: [GSoC][PATCH] t7603: replace test -f by test_path_is_file","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-10T06:48:51Z","receivedAt":"2025-02-10T06:49:02Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sat, Feb 08, 2025 at 01:57:31PM -0300, Lucas Oshiro wrote:\n> `test_path_is_file` provides a better output when asserting whether a\n> file exists. Replace the occurrences of `test -f` in 7603 by it,\n\nTiny nit, which probably does not warrant a reroll: it would be nice to\nconsistently refer to test suites with the \"t\" prefix, so here you'd say\n\"t7603\" instead of just \"7603\".\n\nThe changes themselv look good to me, thanks!\n\nPatrick\n"}]}