Skip to main content

Module graph

Module graph 

Source
Expand description

__gunnar_graph__ — the commit graph as Arrow.

Columns: oid, parents (list of oid hex), tree, committer_time, generation. Reserved, so ordinary list / decompress / iceberg readers skip it; and because it is a real Arrow IPC stream, slicing its manifest byte range hands DuckDB / Polars / DataFusion a queryable commit graph with zero consumer code.

Generation numbers follow gix-commitgraph / git’s own convention: a commit with no parent inside this archive has generation 1, and otherwise generation = 1 + max(generation of parents present). So ancestry and merge-base tests become integer comparisons instead of object walks: if gen(a) <= gen(b) then b cannot be an ancestor of a.

A parent that is absent from the archive contributes nothing to the max. That is the honest reading for a cold tier: a shallow or partially-repacked archive is a subgraph, and its generation numbers are only ever compared within it.

Structs§

CommitNode
One row of the commit graph.

Functions§

assign_generations
Assign generation numbers to nodes (which need not be in any order) and return them sorted by (generation, oid) — parents before children, which is also the order the reachability pass wants.
build_graph_batch
Serialize the commit graph to a single Arrow record batch.
decode_graph
Decode a __gunnar_graph__ Arrow IPC section.
graph_schema
read_graph
Read the commit graph out of a sealed archive. Ok(None) when absent.