Message ID | 20250304094153.28959-1-danimahendra0904@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | t1403: verify path exists and is a file | expand |
Verify that if the path exists, then the path is a file using
test_path_is_file() helper function.
Thanks,
Mahendra
Mahendra Dani (1):
t1403: verify that path exists and is a file
t/t1403-show-ref.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Range-diff against v3:
1: 42dd686abe ! 1: d181f98d1a t1403: verify that path exists and is a file
@@ Metadata
## Commit message ##
t1403: verify that path exists and is a file
- test -e does not provide a nice error message when
- we hit test failures, so use test_path_exists() instead
- and verify that if the path exists then it is a file using test_path_is_file().
+ Verify that if the path exists then it is a file using test_path_is_file().
Signed-off-by: Mahendra Dani <danimahendra0904@gmail.com>
@@ t/t1403-show-ref.sh: test_expect_success 'show-ref --verify with dangling ref' '
remove_object() {
file=$(sha1_file "$*") &&
- test -e "$file" &&
-+ test_path_exists "$file" &&
+ test_path_is_file "$file" &&
rm -f "$file"
} &&
Mahendra Dani <danimahendra0904@gmail.com> writes: > test -e does not provide a nice error message when we hit test failures, > so use test_path_exists() instead. > > Further, verify that if the path exists, then the path is a file using > test_path_is_file() helper function. > > This patch does not change any code in v2, but is rather submitted with proper formatting > which was lacking in v2. > I apologize for the incorrect patch submission in v2. My cursory look didn't spot anything iffy in v2 and I found it nicely described. I do not see anything, other than the above 3-line paragraph, that is different in v3 from v2, which is a bit curious. Thanks.