]> git.ipfire.org Git - thirdparty/git.git/commit
t7110: replace `test -f` with `test_path_is_*` helpers
authorMatteo Bagnolini <matteobagnolini2003@gmail.com>
Fri, 3 Jan 2025 13:00:35 +0000 (14:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Jan 2025 18:35:13 +0000 (10:35 -0800)
commit866ea877036ce581e0d3c130f527631cd8b36bdf
tree35e1471aab74c655dfdcd4ce51d0ce6f285d3581
parent1b4e9a5f8b5f048972c21fe8acafe0404096f694
t7110: replace `test -f` with `test_path_is_*` helpers

`test -f` and `! test -f` do not provide clear error messages when they fail.
To enhance debuggability, use `test_path_is_file` and `test_path_is_missing`,
which instead provide more informative error messages.

Note that `! test -f` checks if a path is not a file, while
`test_path_is_missing` verifies that a path does not exist. In this specific
case the tests are meant to check the absence of the path, making
`test_path_is_missing` a valid replacement.

Signed-off-by: Matteo Bagnolini <matteobagnolini2003@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7110-reset-merge.sh