On Fri, Jul 05, 2024 at 05:43:37PM -0500, Justin Tobler wrote: > On 24/07/03 09:56PM, shejialuo wrote: > > The static function "report" provided by "fsck.c" aims at reporting the > > problems related to object database which cannot be reused for refs. > > In order to provide a unified interface which can report either objects > > or refs, create a new function "vfsck_report" by adding > > "checked_ref_name" parameter following the "report" prototype. However, > > instead of using "...", provide "va_list" to allow more flexibility. > > > > The "vfsck_report" function will use "error_func" registered in > > "fsck_options" function to report customized messages. Change > > "error_func" prototype to align with the "vfsck_report". > > > > Change "report" function to make it use "vfsck_report" to report > > objects-related messages. Add a new function called "fsck_refs_report" > > to use "vfsck_report" to report refs-related messages. > > To restate in my own words, the existing "report" function is checked if > an fsck message should be returned and also formats the message. It is > currently setup to only handle object database related fsck problems. > The `fsck_error` function type is generalized to also accept a reference > name enabling fsck problems to be reported for references. > Exactly, I will add more information in the commit message. Thanks, Jialuo