Thread (13 messages) 13 messages, 2 authors, 2025-03-04
DORMANTno replies

[PATCH v4 1/1] t1403: verify that path exists and is a file

From: Mahendra Dani <hidden>
Date: 2025-03-04 11:28:45
Subsystem: the rest · Maintainer: Linus Torvalds

Verify that if the path exists then it is a file using test_path_is_file().

Signed-off-by: Mahendra Dani <redacted>
---
 t/t1403-show-ref.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh
index 9d698b3cc3..9da3650e91 100755
--- a/t/t1403-show-ref.sh
+++ b/t/t1403-show-ref.sh
@@ -196,7 +196,7 @@ test_expect_success 'show-ref --verify with dangling ref' '
 
 	remove_object() {
 		file=$(sha1_file "$*") &&
-		test -e "$file" &&
+		test_path_is_file "$file" &&
 		rm -f "$file"
 	} &&
 
-- 
2.39.2 (Apple Git-143)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help