summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorMeet Soni <meetsoni3017@gmail.com>2024-12-27 16:23:45 +0530
committerJunio C Hamano <gitster@pobox.com>2024-12-27 08:13:59 -0800
commitcef3d4a89f8d21fae6669822cbb540927020d93b (patch)
tree7d900eec37af18ab308487772b75430feece7365 /builtin/commit.c
parent76cf4f61c87855ebf0784b88aaf737d6b09f504b (diff)
t7611: replace test -f with test_path_is* helpers
Replace `test -f` and `test ! -f` with `test_path_is_file` and `test_path_is_missing` for better debuggability. While `test -f` ensures that the file exists and is a regular file, `test_path_is_file` provides clearer error messages on failure. On the other hand, `test ! -f` checks either the absence of a regular file or the presence of any other filesystem object, but looking at them in the test individually, all of them should've said `test ! -e`, i.e. "there shouldn't be anything at given path on filesystem." Replace these cases with `test_path_is_missing` for better debuggability. Helped-by: karthik nayak <karthik.188@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Meet Soni <meetsoni3017@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions