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

Re: [PATCH 0/6] odb: track commit graphs via object source

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 4, 2025, 23:12 UTC
Message-ID
<xmqq5xdx7qx4.fsf@gitster.g>
In-Reply-To
<20250904-b4-pks-commit-graph-via-source-v1-0-d932c2481e1a@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> commit graphs are currently stored on the object database level. This
> doesn't really make much sense conceptually, given that commit graphs
> are specific to one object source. Furthermore, with the upcoming
> pluggable object database effort, an object source's backend may not
> evene have a commit graph in the first place but store that information
> in a different format altogether.
>
> This patch series prepares for that by moving the commit graph from
> `struct object_database` into `struct odb_source`.

Hmph, I am finding the above hard to agree with at the conceptual level. In some future, we may use multiple object stores in a single repository. Perhaps we would be storing older parts of history in semi-online storage while newer parts are stored in readily available storage. But the side data structure that allows us to quickly learn who are parents of one commit is without having to go to the object store in order to parse the actualy commit object can be stored for the entire history if we wanted to, or more recent part of the history but not limited to the "readily available storage" part. IOW, where the boundary between the older and the newer parts of the history lies and which commits the commit graph covers should be pretty much independent.

So moving from object_database (i.e. the whole world) to individual odb_source (i.e. where one particular subset of the history is stored) feels like totally backwards to me. Surely, a commit graph file may be defined over a set of packfiles and remaining loose object files, but it is not like an instance of the commit-graph file is tied to packfiles in the sense that it uses the index into some packfile instead of the actual object names to refer to commits, or anything like that (this is quite different from other files that are very specific to a single object store, like midx that is tied to the packfiles it describes).

Previous: Taylor BlauNext: Derrick Stolee
Message 13 of 26 in “odb: track commit graphs via object source”
  1. 0/6 odb: track commit graphs via object sourcePatrick Steinhardt, Sep 4, 2025
  2. 1/6 blame: drop explicit check for commit graphPatrick Steinhardt, Sep 4, 2025
  3. Taylor BlauSep 11, 2025
  4. 2/6 revision: drop explicit check for commit graphPatrick Steinhardt, Sep 4, 2025
  5. Taylor BlauSep 11, 2025
  6. 3/6 commit-graph: return the prepared commit graph from `prepare_commit_graph()`Patrick Steinhardt, Sep 4, 2025
  7. Taylor BlauSep 11, 2025
  8. 4/6 commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`Patrick Steinhardt, Sep 4, 2025
  9. Taylor BlauSep 11, 2025
  10. 5/6 commit-graph: pass graphs that are to be merged as parameterPatrick Steinhardt, Sep 4, 2025
  11. 6/6 odb: move commit-graph into the object sourcesPatrick Steinhardt, Sep 4, 2025
  12. Taylor BlauSep 11, 2025
  13. Junio C HamanoSep 4, 2025
  14. Derrick StoleeSep 5, 2025
  15. Patrick SteinhardtSep 8, 2025
  16. Derrick StoleeSep 8, 2025
  17. Patrick SteinhardtSep 10, 2025
  18. Junio C HamanoSep 25, 2025
  19. Patrick SteinhardtSep 26, 2025
  20. Patrick SteinhardtOct 2, 2025
  21. Patrick SteinhardtOct 2, 2025
  22. Junio C HamanoOct 2, 2025
  23. Derrick StoleeOct 3, 2025
  24. Taylor BlauSep 11, 2025
  25. Junio C HamanoSep 4, 2025
  26. Patrick SteinhardtSep 5, 2025

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.