diff options
author | shejialuo <shejialuo@gmail.com> | 2024-08-08 19:26:57 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 09:36:52 -0700 |
commit | 3473d18fad56b40ac3bce457b3779866461cd921 (patch) | |
tree | a38f00818fe941f723a6cdb3a66b752357eee5f2 /commit.c | |
parent | 0ec5dfe8c45be2efd6350b3a1a3885c795a85578 (diff) |
fsck: add a unified interface for reporting fsck messages
The static function "report" provided by "fsck.c" aims at checking error
type and calling the callback "error_func" to report the message. Both
refs and objects need to check the error type of the current fsck
message. In order to extract this common behavior, create a new function
"fsck_vreport". Instead of using "...", provide "va_list" to allow more
flexibility.
Instead of changing "report" prototype to be align with the
"fsck_vreport" function, we leave the "report" prototype unchanged due
to the reason that there are nearly 62 references about "report"
function. Simply change "report" function to use "fsck_vreport" to
report objects related messages.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions