]> git.99rst.org Git - git.git/commitdiff
t1403: verify that path exists and is a file
authorMahendra Dani <redacted>
Tue, 4 Mar 2025 11:27:28 +0000 (16:57 +0530)
committerJunio C Hamano <redacted>
Tue, 4 Mar 2025 18:13:54 +0000 (10:13 -0800)
Verify that if the path exists then it is a file using test_path_is_file().

Signed-off-by: Mahendra Dani <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t1403-show-ref.sh

index 9d698b3cc35a7f13f30c36a0d8fe7b5ed1430b07..9da3650e91bac5481300c13c3a0f668d48985de6 100755 (executable)
@@ -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"
        } &&
 
git clone https://git.99rst.org/PROJECT