git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rev-list: ignore replacements in the connectivity check

From
Kristofer Karlsson <krka@spotify.com>
Date
Nov 3, 2026, 08:35 UTC
Message-ID
<CAL71e4M7yFnTzYD0eVVGRmzkzSXbU0KZ-JScQOyB4-dB5xkAHA@mail.gmail.com>
In-Reply-To
<xmqq4idyhotf.fsf@gitster.g>
On Mon, 2 Nov 2026 at 23:05, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
>
> "Kristofer Karlsson via GitGitGadget" <gitgitgadget@gmail.com>
> 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

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 3 of 8 in “rev-list: ignore replacements in the connectivity check”
  1. rev-list: ignore replacements in the connectivity checkKristofer Karlsson via GitGitGadget, Nov 2, 2026
  2. Junio C HamanoNov 2, 2026
  3. Kristofer KarlssonNov 3, 2026
  4. Patrick SteinhardtNov 3, 2026
  5. Karthik NayakNov 3, 2026
  6. Kristofer KarlssonNov 3, 2026
  7. Patrick SteinhardtNov 3, 2026
  8. Kristofer KarlssonNov 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.