From: Kristofer Karlsson Date: Tue, 03 Nov 2026 08:35:07 GMT Subject: Re: [PATCH] rev-list: ignore replacements in the connectivity check Message-ID: In-Reply-To: On Mon, 2 Nov 2026 at 23:05, Junio C Hamano wrote: > > "Kristofer Karlsson via GitGitGadget" > writes: > > > Teach the connectivity check to ignore replacements as well, so > > that it verifies the same objects that the commands relying on its > > result will read. > > Sounds like absolutely the right thing to do. We might want to say > that we check both the original and the replacement, i.e., instead > of ignoring replace refs, we ensure that the commits, trees, and > blobs reachable from the replacement objects all exist by treating > those objects as if they were also at the tips of the connectivity > graph. > > [snip] > We can address the "shouldn't we make sure that replacement objects > used when the resulting history is in use are backed by objects > reachable from them?" issue separately. I have not fully thought this through yet, but I'm happy to follow up with further strengthening if there's a gap here. My preliminary thinking is that since replacements are implemented as regular refs (refs/replace/OLD -> NEW), their reachable objects should already be covered by ordinary connectivity checks when those refs are fetched or pushed. And thanks for the review! Kristofer