Re: [PATCH 5/6] fsck: provide a function to fsck buffer without object struct
From: Taylor Blau <hidden>
Date: 2023-01-18 21:24:34
From: Taylor Blau <hidden>
Date: 2023-01-18 21:24:34
On Wed, Jan 18, 2023 at 03:43:53PM -0500, Jeff King wrote:
However, the only external interface that fsck.c provides is fsck_object(), which requires an object struct, then promptly discards everything except its oid and type. Let's factor out the post-discard part of that function as fsck_buffer(), leaving fsck_object() as a thin wrapper around it. That will provide more flexibility for callers which may not have a struct.
It's really nice that the only thing we care about having an object struct around for is basically just knowing its type. IOW it seems to have made the refactoring here pretty straightforward, which is nice ;-). Thanks, Taylor