]> git.ipfire.org Git - thirdparty/git.git/commit
t9146: replace test -d/-e/-f with appropriate test_path_is_* function
authorChandra Pratap <chandrapratap3519@gmail.com>
Wed, 14 Feb 2024 17:50:48 +0000 (17:50 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Feb 2024 19:06:28 +0000 (11:06 -0800)
commitc431a235e226daef39091940c7db4ab5067d4643
tree889cd0672ae2757e446c5ec5459374ca7e06e311
parentefb050becb6bc703f76382e1f1b6273100e6ace3
t9146: replace test -d/-e/-f with appropriate test_path_is_* function

The helper functions test_path_is_* provide better debugging
information than test -d/-e/-f.

Replace "if ! test -d then <error message>" and "test -d" with
"test_path_is_dir" at places where we check for existent directories.

Replace "test -f" with "test_path_is_file" at places where we check
for existent files.

Replace "test ! -e" and "if test -d then <error message>" with
"test_path_is_missing" where we check for non-existent directories.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9146-git-svn-empty-dirs.sh