threads / patch / 66668

patcht7104: use test_path_is_file instead of test -f

Subject: [GSoC PATCH] t7104: use test_path_is_file instead of test -f

## tl;dr

4 messages between Oct 26, 2026 and Oct 27, 2026. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Tilak Kumar· Oct 26, 2026, 16:45 UTC · lore

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(-)
Show changes to t/t7104-reset-hard.sh +1 −1
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
Junio C Hamano· Oct 26, 2026, 21:20 UTC · re: Tilak Kumar · lore

Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f

Tilak Kumar <raaztilak07@gmail.com> writes:
> Use the helper so that a missing file is reported
> with a clear message instead of a silent failure.

This makes sense but what is GSoC doing in the patch title? Has the program already been announced for 2027?

Show 17 quoted lines
> 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
>  
>  '
Tilak Raaz· Oct 27, 2026, 03:16 UTC · re: Junio C Hamano · lore

Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f

Junio C Hamano <gitster@pobox.com> writes:
> This makes sense but what is GSoC doing in the patch title?  Has the
> program already been announced for 2027?

Not yet.I added the prefix while preparing to apply for GSoC 2027, which was premature. I will use a plain [PATCH] prefix going forward. Thanks for the feedback. I can resend this as v2 with the subject fixed if that is helpful. Thanks.

Junio C Hamano· Oct 27, 2026, 19:29 UTC · re: Tilak Raaz · lore

Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f

Tilak Raaz <raaztilak07@gmail.com> writes:
Show 7 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> This makes sense but what is GSoC doing in the patch title?  Has the
>> program already been announced for 2027?
>
> Not yet.I added the prefix while preparing to apply for GSoC 2027,
> which was premature.
OK, that is fine and makes your patches more informative.

My question was not rhetorical, complaining about the use of the mark. I knew (and confirmed later with the people who run the program at Google) that the announcement would not be made until December, and wanted to know if there is public information that says otherwise.

Thanks.

← back to recent threads