]> git.ipfire.org Git - thirdparty/git.git/commit
t2400: replace 'test -[efd]' with 'test_path_is_*'
authorRodrigo Michelassi <rodmichelassi@gmail.com>
Tue, 17 Jun 2025 00:29:39 +0000 (21:29 -0300)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jun 2025 04:49:05 +0000 (21:49 -0700)
commit855cfc65aeca5b2458a6bc100eb1280a119fdb87
tree4796329477ef21795c97939bb703fabcb50c349f
parentf93ff170b93a1782659637824b25923245ac9dd1
t2400: replace 'test -[efd]' with 'test_path_is_*'

'test_path_is_file', 'test_path_is_dir' and 'test_file_is_missing'
are test helpers used in Git's development, that emit useful
diagnostic information when they detect a failing condition, while
test -[efd] does not.

Replace the basic shell commands 'test -f', 'test -d' and 'test -e',
with these test helpers.

Co-authored-by: Isabella Caselli <icaselli@usp.br>
Signed-off-by: Isabella Caselli <icaselli@usp.br>
Signed-off-by: Rodrigo Michelassi <rodmichelassi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2400-worktree-add.sh