I've looked at the rest of the patch set and I think that this set is worth taking. > This a string of refactors that ends up with all of the > type-specific fsck functions not getting an object struct at all. > My goal there was two-fold: > > - it makes it harder to introduce weirdness like we saw in > patches 5-8. > > - it _could_ make things less awkward for callers like index-pack > which don't necessarily have object structs. And at the end, we > basically have an fsck_object() that doesn't need an object > struct. But index-pack still calls fsck_walk(), which does (and > which relies on the parsed values to traverse). It's not > entirely clear to me whether index-pack needs to be doing > fsck_walk() in the first place, or if it should be relying on > the usual connectivity check. > > So I'm undecided whether this is worth taking on its own, or if > trying to avoid object structs in the fsck code is just a > fool's errand. I do think the result isn't too bad to look at, > though and there are some minor improvements along the way > (e.g., patch 17 is able to drop some awkwardness). If we can partially avoid object structs in the fsck code, I think that's an improvement too.