Git development
 help / color / mirror / Atom feed
* [GSoC PATCH] t7104: use test_path_is_file instead of test -f
@ 2026-10-26 16:45 Tilak Kumar
  2026-10-26 21:20 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Tilak Kumar @ 2026-10-26 16:45 UTC (permalink / raw)
  To: git; +Cc: Tilak Kumar

Use the helper so that a missing file is reported
with a clear message instead of a silent failure.

Signed-off-by: Tilak Kumar <raaztilak07@gmail.com>
---
 t/t7104-reset-hard.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t7104-reset-hard.sh b/t/t7104-reset-hard.sh
index c23d6e3f52..acf145e69b 100755
--- a/t/t7104-reset-hard.sh
+++ b/t/t7104-reset-hard.sh
@@ -29,7 +29,7 @@ test_expect_success 'reset --hard should restore unmerged ones' '
 
 	git reset --hard &&
 	git ls-files --error-unmatch before/1 before/2 hello later/3 &&
-	test -f hello
+	test_path_is_file hello
 
 '
 
-- 
2.55.0


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

end of thread, other threads:[~2026-10-27 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 16:45 [GSoC PATCH] t7104: use test_path_is_file instead of test -f Tilak Kumar
2026-10-26 21:20 ` Junio C Hamano
2026-10-27  3:16   ` Tilak Raaz
2026-10-27 19:29     ` 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