* [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh
@ 2026-10-23 15:48 Ogundipe Sola Taiwo
2026-10-26 10:20 ` [PATCH] t5300: modernize test path checks in t5300 Ogundipe Sola Taiwo
0 siblings, 1 reply; 2+ messages in thread
From: Ogundipe Sola Taiwo @ 2026-10-23 15:48 UTC (permalink / raw)
To: git
Cc: Ogundipe Sola Taiwo, Christian Couder, Siddharth Asthana,
Usman Akinyemi
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] t5300: modernize test path checks in t5300
2026-10-23 15:48 [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh Ogundipe Sola Taiwo
@ 2026-10-26 10:20 ` Ogundipe Sola Taiwo
0 siblings, 0 replies; 2+ messages in thread
From: Ogundipe Sola Taiwo @ 2026-10-26 10:20 UTC (permalink / raw)
To: git
Cc: Ogundipe Sola Taiwo, Christian Couder, Siddharth Asthana,
Usman Akinyemi
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-26 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-23 15:48 [Outreachy] Microproject: Modernize file check in t5300-pack-object.sh Ogundipe Sola Taiwo
2026-10-26 10:20 ` [PATCH] t5300: modernize test path checks in t5300 Ogundipe Sola Taiwo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox