From: Junio C Hamano Date: Wed, 17 Mar 2021 19:01:01 GMT Subject: Re: [PATCH v4 17/22] fsck.c: pass along the fsck_msg_id in the fsck_error callback Message-ID: In-Reply-To: <20210316161738.30254-18-avarab@gmail.com> Ævar Arnfjörð Bjarmason writes: > Change the fsck_error callback to also pass along the > fsck_msg_id. Before this change the only way to get the message id was > to parse it back out of the "message". Nice. > Let's pass it down explicitly for the benefit of callers that might > want to use it, as discussed in [1]. > > Passing the msg_type is now redundant, as you can always get it back > from the msg_id, but I'm not changing that convention. It's really > common to need the msg_type, and the report() function itself (which > calls "fsck_error") needs to call fsck_msg_type() to discover > it. Let's not needlessly re-do that work in the user callback.