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

Re: commit-graph overflow generation chicken and egg

From
Jeff King <peff@peff.net>
Date
Jun 9, 2022, 15:26 UTC
Message-ID
<YqIRD8IwUFt6T8p+@coredump.intra.peff.net>
In-Reply-To
<220609.86h74utg6j.gmgdl@evledraar.gmail.com>
On Thu, Jun 09, 2022 at 09:49:15AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 10 quoted lines
> It's certainly interesting to see *how* we got to this state, but just
> so we're on the same page: I fundimentally don't think it matters to the
> *real* bug here.
> 
> Which is that at the very least f90fca638e9 (commit-graph: consolidate
> fill_commit_graph_info, 2021-01-16) and e8b63005c48 (commit-graph:
> implement generation data chunk, 2021-01-16) (CC'd author) have a bad
> regression on earlier fixes that read-only operations of the
> commit-graph *must not die*. I.e. the "parse" and "verify" paths of the
> commit-graph.c code shouldn't call exit(), die() etc.

Yeah, I'd agree that this is a good philosophy to follow. The commit-graph data is meant to be an optimization, and we can always continue without it.

Show 8 quoted lines
> If you replace your graph with Jeff's corrupt one and run "git status",
> "git log" etc. it's still emitting one verbose complaint, but it no
> longer does so in loops (at least for these paths, but e.g. "git gc" is
> still doing that).
> 
> But it does get us to where we can run "git gc", and while complaining
> too much along the way will write out a new & valid commit graph at the
> end ("[... comments are mine"):

Yeah, getting through "git gc" is the key thing here. Then the problem solves itself, sometimes even automatically (via auto-gc).

-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Derrick Stolee
Message 12 of 13 in “commit-graph overflow generation chicken and egg”
  1. Jeff KingJun 8, 2022
  2. Derrick StoleeJun 8, 2022
  3. Jeff KingJun 8, 2022
  4. Patrick SteinhardtJul 1, 2022
  5. Patrick SteinhardtJul 4, 2022
  6. Derrick StoleeJul 4, 2022
  7. Will ChandlerJul 5, 2022
  8. Taylor BlauJul 5, 2022
  9. Jeff KingJul 6, 2022
  10. Jeff KingJul 6, 2022
  11. Ævar Arnfjörð BjarmasonJun 9, 2022
  12. Jeff KingJun 9, 2022
  13. Derrick StoleeJun 9, 2022

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.