Thread (23 messages) 23 messages, 4 authors, 2023-02-01

Re: [PATCH 5/6] fsck: provide a function to fsck buffer without object struct

From: Jeff King <hidden>
Date: 2023-01-19 02:07:34

On Wed, Jan 18, 2023 at 04:24:25PM -0500, Taylor Blau wrote:
On Wed, Jan 18, 2023 at 03:43:53PM -0500, Jeff King wrote:
quoted
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
;-).
Yeah, it was always in the back of my mind while doing other fsck
refactors. But I have to admit that I was surprised that we were so
close to the finish line. :)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help