Skip to main content

Module calc

Module calc 

Source
Expand description

Graph calculation for commit visualization.

This module is adapted from Serie by Kyosuke Fujimoto, licensed under the MIT License. The algorithm calculates x,y positions for commits and edges to visualize the commit DAG.

Key changes from Serie:

  • Uses CommitCid instead of CommitHash
  • Uses VoidCommit instead of git Commit
  • Simplified repository interface via GraphContext

Structs§

Edge
A visual edge segment in the graph.
Graph
Calculated graph structure for rendering.
OwnedGraph
Owned graph structure (no lifetime parameter).
SimpleGraphContext
Simple in-memory graph context built from a commit list.

Enums§

EdgeType
Edge type determines the character used for rendering.

Traits§

GraphContext
Context providing commit relationships for graph calculation.

Functions§

calc_graph
Calculate the graph layout for a list of commits.
calc_graph_owned
Calculate graph layout and return an owned structure.