@leroysheep / LeeRoySheep / commits / 1d6fd6d36e

t5315: use test_path_is_file for loose-object check

Use test_path_is_file instead of test -f when checking that the loose object was written to the expected path. This uses Git's path-checking helper, which provides more specific failure output than a raw test -f check. Signed-off-by: Bilal El Khatabi <elkhatabibilal@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Bilal El Khatabi committed Mar 19, 2026 at 18:06 UTC 1d6fd6d36edebd23407a49513f6482ceb3e0f648
1 file changed +1 -1
t/t5315-pack-objects-compression.sh
+1 -1
index 8bacd96275..d0feab17b4 100755 --- a/t/t5315-pack-objects-compression.sh +++ b/t/t5315-pack-objects-compression.sh @@ -10,7 +10,7 @@ test_expect_success setup ' # make sure it resulted in a loose object ob=$(sed -e "s/\(..\).*/\1/" object-name) && ject=$(sed -e "s/..\(.*\)/\1/" object-name) && - test -f .git/objects/$ob/$ject + test_path_is_file .git/objects/$ob/$ject ' while read expect config