public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Bilal El Khatabi <elkhatabibilal@gmail.com>
To: git@vger.kernel.org
Cc: pabloosabaterr@gmail.com, karthik.188@gmail.com,
	jltobler@gmail.com, ayu.chandekar@gmail.com,
	siddharthasthana31@gmail.com
Subject: [GSOC PATCH v2] t5315: use test_path_is_file for loose-object check
Date: Thu, 19 Mar 2026 18:06:52 +0000	[thread overview]
Message-ID: <20260319180803.164335-1-elkhatabibilal@gmail.com> (raw)
In-Reply-To: <20260319160301.98039-1-elkhatabibilal@gmail.com>

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>
---
 t/t5315-pack-objects-compression.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5315-pack-objects-compression.sh b/t/t5315-pack-objects-compression.sh
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
-- 
2.53.0


  parent reply	other threads:[~2026-03-19 18:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 16:02 [PATCH] t5315: use test_path_is_file for loose-object check Bilal El Khatabi
2026-03-19 16:26 ` Pablo
2026-03-19 18:35   ` Junio C Hamano
2026-03-19 18:06 ` Bilal El Khatabi [this message]
2026-03-19 18:58   ` [GSOC PATCH v2] " Junio C Hamano
2026-03-19 19:29     ` BILAL EL KHATABI
2026-03-20 10:08       ` Karthik Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260319180803.164335-1-elkhatabibilal@gmail.com \
    --to=elkhatabibilal@gmail.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=pabloosabaterr@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox