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 25, 2025, 19:17 UTC
Message-ID
<xmqqo6qyfijl.fsf@gitster.g>
In-Reply-To
<aMFjGoPhGsRCTihO@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 11 quoted lines
> There is no inherent reason why a new backend would not be able to use
> the existing commit-graph infrastructure indeed. But there are reasons
> that specific backends may not want to do so. If objects are already
> stored in a database table, then it may make way more sense to store
> additional metadata that is currently stored in the commit-graph in a
> secondary database table instead of in the commit graph.
> ...
> This is roughly what I have in my head right now. And I realize that
> this information really should be sitting in a design document. I'm
> working on that, but still need to land two more patch series before I
> want to send such a patch series to the list.

So is everybody happy with this line of thought that makes it mandatory for each backend to decide and implement the commit-graph support if they want to?

My reading of the later part of Taylor's message[*] tells me that at least Taylor does not agree with that position, and I am not sure about this design choice, either. Surely, each backend can have its own optimization, but looking at the way data from the commit-graph and other auxiliary data files are used to optimize real operations (like populating the essential fields of the commit object first from the graph, only to read other things lazily from the object database, or switching to completely different traversal machinery when reachability bitmap is available), we cannot say that each backend can store whatever side data they please and leave it at that. The code paths that are supposed to be generic need to be aware of these side data used for optimization to some degree, so conceptually it is much cleaner (well, at least to my eyes, that is) to declare that the auxiliary data files like commit-graph and reachability bitmaps are defined on the objects in the repository, no matter what backend is used to store them.

[Reference]
 * https://lore.kernel.org/git/aMNWgD4wKa1a5R8g@nand.local/ 
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 18 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.