Skip to contentSkip to conversation

t0410: use test_path_exists instead of test -e

PATCH In review Tilak Kumar 2 participants 2 messages Oct 29

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t0410: use test_path_exists instead of test -e

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

---
 t/t0410-partial-clone.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t0410-partial-clone.sh +1 -1
index a54685e3c7..c3c5fd6e33 100755
@@ -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
Signature · 1 line
2.55.0
#1 lore raw
Quoted 8 lines · Tilak Kumar

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

---
 t/t0410-partial-clone.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Makes sense. Will queue.

Thanks.