threads / patch / 66703

patcht0410: use test_path_exists instead of test -e

Subject: [GSoC PATCH] t0410: use test_path_exists instead of test -e

## tl;dr

2 messages between Oct 29, 2026 and Oct 29, 2026. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Tilak Kumar· Oct 29, 2026, 14:15 UTC · lore

Use the test_path_exists helper so that a missing promisor packfile is reported with a clear message instead of failing silently.

Signed-off-by: Tilak Kumar <raaztilak07@gmail.com>
---
 t/t0410-partial-clone.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t0410-partial-clone.sh +1 −1
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index a54685e3c7..c3c5fd6e33 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -627,7 +627,7 @@ test_expect_success 'gc stops traversal when a missing but promised object is re
 	git -C repo gc &&
 
 	# Ensure that the promisor packfile still exists, and remove it
-	test -e repo/.git/objects/pack/pack-$HASH.pack &&
+	test_path_exists repo/.git/objects/pack/pack-$HASH.pack &&
 	rm repo/.git/objects/pack/pack-$HASH.* &&
 
 	# Ensure that the single other pack contains the commit, but not the tree
-- 
2.55.0
Junio C Hamano· Oct 29, 2026, 18:51 UTC · re: Tilak Kumar · lore

Re: [GSoC PATCH] t0410: use test_path_exists instead of test -e

Tilak Kumar <raaztilak07@gmail.com> writes:
Show 8 quoted lines
> Use the test_path_exists helper so that a missing
> promisor packfile is reported with a clear message
> instead of failing silently.
>
> Signed-off-by: Tilak Kumar <raaztilak07@gmail.com>
> ---
>  t/t0410-partial-clone.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Makes sense.  Will queue.
Thanks.

← back to recent threads