# [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh

11 messages from 2026-10-23 to 2026-10-29. Participants: Ogundipe Sola Taiwo, Usman Akinyemi, Junio C Hamano.
Thread: https://gitlist.dev/t/66646

## Ogundipe Sola Taiwo, 2026-10-23 15:48

Subject: [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh
Message-ID: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261023154851.7876-1-ogundipesolataiwo12%40gmail.com

```
Hi everyone,

My name is Sola Ogundipe. I'm an Outreachy applicant for the December 2026 round.
I've cloned and setup the repo locally and also played around with adding a git command
following the "My First Contribution Tutorial".

I'd like to work on modernizing the 5 occurences of file check in the t5300-pack-object.sh
file. I've checked the public inbox and found no one working on fixing the same issue for
this file.

Please let me know if I should proceed with the changes.

Best regards,
Sola



```

## Ogundipe Sola Taiwo, 2026-10-26 10:20

Subject: [PATCH] t5300: modernize test path checks in t5300
Message-ID: <20261026102017.2689-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261026102017.2689-1-ogundipesolataiwo12%40gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
This commit improves test t5300-pack-object by converting old-style
path checks to use the `test_path_is_file` helper function.

Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
---
 t/t5300-pack-object.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index aac139e6a0..e5ce478484 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -283,11 +283,11 @@ test_expect_success 'survive missing objects/pack directory' '
 		GOP=.git/objects/pack &&
 		rm -fr $GOP &&
 		git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.pack &&
+		test_path_is_file $GOP/pack-${packname_3}.pack &&
 		cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.idx &&
+		test_path_is_file $GOP/pack-${packname_3}.idx &&
 		cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
-		test -f $GOP/pack-${packname_3}.keep
+		test_path_is_file $GOP/pack-${packname_3}.keep
 	)
 '

@@ -376,7 +376,7 @@ test_expect_success 'build pack index for an existing pack' '
 	rm -f test-4.keep &&
 	git index-pack --keep=why test-4.pack &&
 	cmp test-1-${packname_1}.idx test-4.idx &&
-	test -f test-4.keep &&
+	test_path_is_file test-4.keep &&

 	:
 '
@@ -616,7 +616,7 @@ test_expect_success 'setup: fake a SHA1 hash collision' '
 		cd corrupt &&
 		long_a=$(git hash-object -w ../a | sed -e "s!^..!&/!") &&
 		long_b=$(git hash-object -w ../b | sed -e "s!^..!&/!") &&
-		test -f	.git/objects/$long_b &&
+		test_path_is_file .git/objects/$long_b &&
 		cp -f	.git/objects/$long_a \
 			.git/objects/$long_b
 	)
--
2.56.0.116.g6de20f6092.dirty



```

## Usman Akinyemi, 2026-10-26 20:32

Subject: Re: [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh
Message-ID: <CAPSxiM-xyBNHuA5Lm=e-L6z5zu8dGN5kLwGCPjaYQT8XO9Gizg@mail.gmail.com>
URL: https://gitlist.dev/e/CAPSxiM-xyBNHuA5Lm%3De-L6z5zu8dGN5kLwGCPjaYQT8XO9Gizg%40mail.gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
>
> Hi everyone,
>
> My name is Sola Ogundipe. I'm an Outreachy applicant for the December 2026 round.
> I've cloned and setup the repo locally and also played around with adding a git command
> following the "My First Contribution Tutorial".
Hello Sola,

Welcome to the Git project and thanks for your interest to the Git project.
>
> I'd like to work on modernizing the 5 occurences of file check in the t5300-pack-object.sh
> file. I've checked the public inbox and found no one working on fixing the same issue for
> this file.
>
> Please let me know if I should proceed with the changes.
>
You can work on it.
> Best regards,
> Sola
>
Thanks.


```

## Usman Akinyemi, 2026-10-27 16:56

Subject: Re: [PATCH] t5300: modernize test path checks in t5300
Message-ID: <CAPSxiM85tDse=qD8cEP42uyGFV9JTJYV8_98SWTm1wTmWj7kPw@mail.gmail.com>
URL: https://gitlist.dev/e/CAPSxiM85tDse%3DqD8cEP42uyGFV9JTJYV8_98SWTm1wTmWj7kPw%40mail.gmail.com
In-Reply-To: <20261026102017.2689-1-ogundipesolataiwo12@gmail.com>

```
On Mon, Oct 26, 2026 at 11:20 AM Ogundipe Sola Taiwo
<ogundipesolataiwo12@gmail.com> wrote:
>
> This commit improves test t5300-pack-object by converting old-style

Could you rephrase this to avoid “This commit”? It's redundant in a
commit message."
Please describe the change directly instead. Also, I believe, the term
patch is more
appropriate and not "commit".

> path checks to use the `test_path_is_file` helper function.
>
> Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
> ---
Apart from that, the changes looks good to me.
> --
> 2.56.0.116.g6de20f6092.dirty
>


```

## Ogundipe Sola Taiwo, 2026-10-27 18:36

Subject: [PATCH v2] t5300: modernize test path checks in t5300
Message-ID: <20261027183623.3600-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261027183623.3600-1-ogundipesolataiwo12%40gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
Improves test t5300-pack-object by converting old-style
path checks to use the `test_path_is_file` helper function.

Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
---
Changes in v2:
- Rephrase patch summary to remove redundant wording

 t/t5300-pack-object.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index aac139e6a0..e5ce478484 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -283,11 +283,11 @@ test_expect_success 'survive missing objects/pack directory' '
 		GOP=.git/objects/pack &&
 		rm -fr $GOP &&
 		git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.pack &&
+		test_path_is_file $GOP/pack-${packname_3}.pack &&
 		cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.idx &&
+		test_path_is_file $GOP/pack-${packname_3}.idx &&
 		cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
-		test -f $GOP/pack-${packname_3}.keep
+		test_path_is_file $GOP/pack-${packname_3}.keep
 	)
 '

@@ -376,7 +376,7 @@ test_expect_success 'build pack index for an existing pack' '
 	rm -f test-4.keep &&
 	git index-pack --keep=why test-4.pack &&
 	cmp test-1-${packname_1}.idx test-4.idx &&
-	test -f test-4.keep &&
+	test_path_is_file test-4.keep &&

 	:
 '
@@ -616,7 +616,7 @@ test_expect_success 'setup: fake a SHA1 hash collision' '
 		cd corrupt &&
 		long_a=$(git hash-object -w ../a | sed -e "s!^..!&/!") &&
 		long_b=$(git hash-object -w ../b | sed -e "s!^..!&/!") &&
-		test -f	.git/objects/$long_b &&
+		test_path_is_file .git/objects/$long_b &&
 		cp -f	.git/objects/$long_a \
 			.git/objects/$long_b
 	)

Range-diff against v1:
1:  ca6cd5870e = 1:  ca6cd5870e t5300: modernize test path checks in t5300
--
2.56.0.116.g6de20f6092.dirty



```

## Ogundipe Sola Taiwo, 2026-10-27 18:42

Subject: [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh
Message-ID: <20261027184342.3948-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261027184342.3948-1-ogundipesolataiwo12%40gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
> Could you rephrase this to avoid “This commit”? It's redundant in a
> commit message."
> Please describe the change directly instead. Also, I believe, the term
> patch is more
> appropriate and not "commit".

Thanks for catching that. I've rephrased it.


```

## Usman Akinyemi, 2026-10-28 14:02

Subject: Re: [PATCH v2] t5300: modernize test path checks in t5300
Message-ID: <CAPSxiM9sZXbLQQsMFiWqXDmiGGM7FzCAH2hWizLL-mX3575g_Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAPSxiM9sZXbLQQsMFiWqXDmiGGM7FzCAH2hWizLL-mX3575g_Q%40mail.gmail.com
In-Reply-To: <20261027183623.3600-1-ogundipesolataiwo12@gmail.com>

```
>
> Improves test t5300-pack-object by converting old-style
Looks good now. Thanks.


```

## Junio C Hamano, 2026-10-28 14:12

Subject: Re: [PATCH v2] t5300: modernize test path checks in t5300
Message-ID: <xmqqy0bhdid1.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqy0bhdid1.fsf%40gitster.g
In-Reply-To: <20261027183623.3600-1-ogundipesolataiwo12@gmail.com>

```
Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com> writes:

> Improves test t5300-pack-object by converting old-style
> path checks to use the `test_path_is_file` helper function.

"Improves" -> "Improve".  It would be nicer to state how use of the
helper improves.

See similar test updates from others and review comment on them in
the past 4 weeks from the list archive.

Thanks.

>
> Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
> ---
> Changes in v2:
> - Rephrase patch summary to remove redundant wording
>
>  t/t5300-pack-object.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
> index aac139e6a0..e5ce478484 100755
> --- a/t/t5300-pack-object.sh
> +++ b/t/t5300-pack-object.sh
> @@ -283,11 +283,11 @@ test_expect_success 'survive missing objects/pack directory' '
>  		GOP=.git/objects/pack &&
>  		rm -fr $GOP &&
>  		git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
> -		test -f $GOP/pack-${packname_3}.pack &&
> +		test_path_is_file $GOP/pack-${packname_3}.pack &&
>  		cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
> -		test -f $GOP/pack-${packname_3}.idx &&
> +		test_path_is_file $GOP/pack-${packname_3}.idx &&
>  		cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
> -		test -f $GOP/pack-${packname_3}.keep
> +		test_path_is_file $GOP/pack-${packname_3}.keep
>  	)
>  '
>
> @@ -376,7 +376,7 @@ test_expect_success 'build pack index for an existing pack' '
>  	rm -f test-4.keep &&
>  	git index-pack --keep=why test-4.pack &&
>  	cmp test-1-${packname_1}.idx test-4.idx &&
> -	test -f test-4.keep &&
> +	test_path_is_file test-4.keep &&
>
>  	:
>  '
> @@ -616,7 +616,7 @@ test_expect_success 'setup: fake a SHA1 hash collision' '
>  		cd corrupt &&
>  		long_a=$(git hash-object -w ../a | sed -e "s!^..!&/!") &&
>  		long_b=$(git hash-object -w ../b | sed -e "s!^..!&/!") &&
> -		test -f	.git/objects/$long_b &&
> +		test_path_is_file .git/objects/$long_b &&
>  		cp -f	.git/objects/$long_a \
>  			.git/objects/$long_b
>  	)
>
> Range-diff against v1:
> 1:  ca6cd5870e = 1:  ca6cd5870e t5300: modernize test path checks in t5300
> --
> 2.56.0.116.g6de20f6092.dirty


```

## Ogundipe Sola Taiwo, 2026-10-29 11:48

Subject: [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh
Message-ID: <20261029114846.1601-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261029114846.1601-1-ogundipesolataiwo12%40gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
> "Improves" -> "Improve".  It would be nicer to state how use of the
> helper improves.
>
> See similar test updates from others and review comment on them in
> the past 4 weeks from the list archive.

Will do. Thanks

> Thanks.



```

## Ogundipe Sola Taiwo, 2026-10-29 12:02

Subject: [PATCH v3] t5300: modernize test path checks in t5300
Message-ID: <20261029120210.3722-1-ogundipesolataiwo12@gmail.com>
URL: https://gitlist.dev/e/20261029120210.3722-1-ogundipesolataiwo12%40gmail.com
In-Reply-To: <20261023154851.7876-1-ogundipesolataiwo12@gmail.com>

```
Replace `test -f` commands with `test_path_is_file`, because
it makes debugging a failing test easier by reporting what
expectation was not met.

Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
---
Changes in v3:
- Rephrase patch summary to state how the use of `test_path_is_file`
	improves the debugging of failing tests.

 t/t5300-pack-object.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index aac139e6a0..e5ce478484 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -283,11 +283,11 @@ test_expect_success 'survive missing objects/pack directory' '
 		GOP=.git/objects/pack &&
 		rm -fr $GOP &&
 		git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.pack &&
+		test_path_is_file $GOP/pack-${packname_3}.pack &&
 		cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
-		test -f $GOP/pack-${packname_3}.idx &&
+		test_path_is_file $GOP/pack-${packname_3}.idx &&
 		cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
-		test -f $GOP/pack-${packname_3}.keep
+		test_path_is_file $GOP/pack-${packname_3}.keep
 	)
 '

@@ -376,7 +376,7 @@ test_expect_success 'build pack index for an existing pack' '
 	rm -f test-4.keep &&
 	git index-pack --keep=why test-4.pack &&
 	cmp test-1-${packname_1}.idx test-4.idx &&
-	test -f test-4.keep &&
+	test_path_is_file test-4.keep &&

 	:
 '
@@ -616,7 +616,7 @@ test_expect_success 'setup: fake a SHA1 hash collision' '
 		cd corrupt &&
 		long_a=$(git hash-object -w ../a | sed -e "s!^..!&/!") &&
 		long_b=$(git hash-object -w ../b | sed -e "s!^..!&/!") &&
-		test -f	.git/objects/$long_b &&
+		test_path_is_file .git/objects/$long_b &&
 		cp -f	.git/objects/$long_a \
 			.git/objects/$long_b
 	)

Range-diff against v2:
1:  ca6cd5870e ! 1:  bbce4f6440 t5300: modernize test path checks in t5300
    @@ Metadata
      ## Commit message ##
         t5300: modernize test path checks in t5300

    -    Improves test t5300-pack-object by converting old-style
    -    path checks to use the `test_path_is_file` helper function.
    +    Replace `test -f` commands with `test_path_is_file`, because
    +    it makes debugging a failing test easier by reporting what
    +    expectation was not met.

         Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>

--
2.56.0.116.g6de20f6092.dirty



```

## Junio C Hamano, 2026-10-29 18:36

Subject: Re: [PATCH v3] t5300: modernize test path checks in t5300
Message-ID: <xmqq33to2w1p.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq33to2w1p.fsf%40gitster.g
In-Reply-To: <20261029120210.3722-1-ogundipesolataiwo12@gmail.com>

```
Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com> writes:

> Replace `test -f` commands with `test_path_is_file`, because
> it makes debugging a failing test easier by reporting what
> expectation was not met.
>
> Signed-off-by: Ogundipe Sola Taiwo <ogundipesolataiwo12@gmail.com>
> ---
> Changes in v3:
> - Rephrase patch summary to state how the use of `test_path_is_file`
> 	improves the debugging of failing tests.
>
>  t/t5300-pack-object.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Will queue.  Thanks.


```
