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

4 messages from 2026-10-26 to 2026-10-27. Participants: Tilak Kumar, Junio C Hamano, Tilak Raaz.
Thread: https://gitlist.dev/t/66668

## Tilak Kumar, 2026-10-26 16:45

Subject: [GSoC PATCH] t7104: use test_path_is_file instead of test -f
Message-ID: <20261026164536.50520-1-raaztilak07@gmail.com>
URL: https://gitlist.dev/e/20261026164536.50520-1-raaztilak07%40gmail.com

```
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



```

## Junio C Hamano, 2026-10-26 21:20

Subject: Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f
Message-ID: <xmqq7bj4p3ax.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq7bj4p3ax.fsf%40gitster.g
In-Reply-To: <20261026164536.50520-1-raaztilak07@gmail.com>

```
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?

> 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, 2026-10-27 03:16

Subject: Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f
Message-ID: <CABB4Jh3QD5-4d8+cSgVj+WbP3Uj+FHqL4kS_4uP5anepTEQCQQ@mail.gmail.com>
URL: https://gitlist.dev/e/CABB4Jh3QD5-4d8%2BcSgVj%2BWbP3Uj%2BFHqL4kS_4uP5anepTEQCQQ%40mail.gmail.com
In-Reply-To: <xmqq7bj4p3ax.fsf@gitster.g>

```
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, 2026-10-27 19:29

Subject: Re: [GSoC PATCH] t7104: use test_path_is_file instead of test -f
Message-ID: <xmqq8q3jj61s.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq8q3jj61s.fsf%40gitster.g
In-Reply-To: <CABB4Jh3QD5-4d8+cSgVj+WbP3Uj+FHqL4kS_4uP5anepTEQCQQ@mail.gmail.com>

```
Tilak Raaz <raaztilak07@gmail.com> writes:

> 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.


```
