From: Junio C Hamano Date: Fri, 19 Jun 2015 19:06:58 GMT Subject: Re: [PATCH v6 02/19] fsck: Introduce identifiers for fsck messages Message-ID: In-Reply-To: Johannes Schindelin writes: > Instead of specifying whether a message by the fsck machinery constitutes > an error or a warning, let's specify an identifier relating to the > concrete problem that was encountered. This is necessary for upcoming > support to be able to demote certain errors to warnings. > > In the process, simplify the requirements on the calling code: instead of > having to handle full-blown varargs in every callback, we now send a > string buffer ready to be used by the callback. > > We could use a simple enum for the message IDs here, but we want to > guarantee that the enum values are associated with the appropriate > message types (i.e. error or warning?). Besides, we want to introduce a > parser in the next commit that maps the string representation to the > enum value, hence we use the slightly ugly preprocessor construct that > is extensible for use with said parser. > > Signed-off-by: Johannes Schindelin > --- Nicely implemented. Looks good.