git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GSoC][PATCH v2] t7603: replace test -f by test_path_is_file
@ 2025-02-12 17:28 Lucas Oshiro
  2025-02-12 18:04 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Oshiro @ 2025-02-12 17:28 UTC (permalink / raw)
  To: git; +Cc: ps, Lucas Oshiro

`test_path_is_file` provides a better output when asserting whether a
file exists. Replace the occurrences of `test -f` in t7603 by it,
facilitating the trace of possible test fails.

Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
---

The only difference from v1 is a little typo, missing the t before the
test name.

 t/t7603-merge-reduce-heads.sh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/t/t7603-merge-reduce-heads.sh b/t/t7603-merge-reduce-heads.sh
index 4887ca705b..1f8c3b7ccb 100755
--- a/t/t7603-merge-reduce-heads.sh
+++ b/t/t7603-merge-reduce-heads.sh
@@ -52,12 +52,12 @@ test_expect_success 'merge c1 with c2, c3, c4, c5' '
 	test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
 	test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
 	git diff --exit-code &&
-	test -f c0.c &&
-	test -f c1.c &&
-	test -f c2.c &&
-	test -f c3.c &&
-	test -f c4.c &&
-	test -f c5.c &&
+	test_path_is_file c0.c &&
+	test_path_is_file c1.c &&
+	test_path_is_file c2.c &&
+	test_path_is_file c3.c &&
+	test_path_is_file c4.c &&
+	test_path_is_file c5.c &&
 	git show --format=%s -s >actual &&
 	! grep c1 actual &&
 	grep c2 actual &&
@@ -75,12 +75,12 @@ test_expect_success 'pull c2, c3, c4, c5 into c1' '
 	test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
 	test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
 	git diff --exit-code &&
-	test -f c0.c &&
-	test -f c1.c &&
-	test -f c2.c &&
-	test -f c3.c &&
-	test -f c4.c &&
-	test -f c5.c &&
+	test_path_is_file c0.c &&
+	test_path_is_file c1.c &&
+	test_path_is_file c2.c &&
+	test_path_is_file c3.c &&
+	test_path_is_file c4.c &&
+	test_path_is_file c5.c &&
 	git show --format=%s -s >actual &&
 	! grep c1 actual &&
 	grep c2 actual &&
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [GSoC][PATCH v2] t7603: replace test -f by test_path_is_file
  2025-02-12 17:28 [GSoC][PATCH v2] t7603: replace test -f by test_path_is_file Lucas Oshiro
@ 2025-02-12 18:04 ` Junio C Hamano
  2025-02-12 18:40   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2025-02-12 18:04 UTC (permalink / raw)
  To: Lucas Oshiro; +Cc: git, ps

Lucas Oshiro <lucasseikioshiro@gmail.com> writes:

> `test_path_is_file` provides a better output when asserting whether a
> file exists. Replace the occurrences of `test -f` in t7603 by it,
> facilitating the trace of possible test fails.
>
> Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
> ---
>
> The only difference from v1 is a little typo, missing the t before the
> test name.


I think I fixed that while queueing the v1 iteration already.

You can check what happened to your patch by observing
https://git.kernel.org/pub/scm/git/git.git/log/?h=seen and
https://git.kernel.org/pub/scm/git/git.git/log/?h=next; other
hosting sites may have similar lists, but I find the one at k.org
the handiest to view.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GSoC][PATCH v2] t7603: replace test -f by test_path_is_file
  2025-02-12 18:04 ` Junio C Hamano
@ 2025-02-12 18:40   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2025-02-12 18:40 UTC (permalink / raw)
  To: git; +Cc: Lucas Oshiro, ps

> You can check what happened to your patch by observing
> https://git.kernel.org/pub/scm/git/git.git/log/?h=seen and
> https://git.kernel.org/pub/scm/git/git.git/log/?h=next; other
> hosting sites may have similar lists, but I find the one at k.org
> the handiest to view.

And according to the latter, the topic has been in 'next' already
with yesterday's pushout.

I updated the 'next' again this morning, by the way.

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-12 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 17:28 [GSoC][PATCH v2] t7603: replace test -f by test_path_is_file Lucas Oshiro
2025-02-12 18:04 ` Junio C Hamano
2025-02-12 18:40   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).