From: Jeff King Date: Mon, 23 Feb 2026 12:58:43 GMT Subject: Re: [PATCH 4/4] pack-check: fix verification of large objects Message-ID: <20260223125843.GA215671@coredump.intra.peff.net> In-Reply-To: On Mon, Feb 23, 2026 at 12:30:35PM +0100, Patrick Steinhardt wrote: > > A more concrete test would probably be something like: > > > > 1. Two packs, $X and $Y, both contain the same object. > > > > 2. The object is corrupt in $X but not in $Y. > > > > 3. Running fsck detects that one copy is corrupt but the other is > > not. > > > > Right now it may or may not fail depending on the ordering of the packs > > in the MRU list (which we might be able to tweak via mtimes). But > > hopefully in the "after" state it should deterministically complain > > about $X. > > Yeah. The problem I had here is that I'm not sure whether we have any > tools to reliably create a corrupted object, e.g. with a hash mismatch. > I'll have a look for v2. You can see how do_corrupt_object() in t5303 does it. It's basically finding an offset via show-index and then writing a zero over it with dd. -Peff