Re: [PATCH] t9811: replace 'test -f' and '! test -f' with 'test_path_*'
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
>> - test -f f1 && test -f f2 && test -f file_with_\$metachar &&
>> + test_path_is_file f1 && test_path_is_file f2 && test_path_is_file file_with_\$metachar &&
>
> While at it we could split this line into three lines -- it's getting
> overly long, and we typically don't chain multiple commands on one line
> nowadays.
Show 8 quoted lines
>> - ! test -f main/f10 &&
>> + test_path_is_missing main/f10 &&
>
> This is a stronger guarantee compared to before, as we only checked
> whether the path is not a file. Now we verify that it doesn't exist at
> all, which would be equivalent to `test -e`. That's a strict improvement
> though, but may be worth pointing out in the commit message so that the
> reviewer is not surprised.