Skip to main content

render

Function render 

Source
pub fn render(diag: &GitGraph, max_width: Option<usize>) -> String
Expand description

Render a GitGraph to a Unicode string.

§Arguments

  • diag — the parsed git graph
  • max_width — optional column budget; when Some(N) commit ids are truncated with so the label column stays within the budget.

§Returns

A multi-line string ready for printing. Branch names appear at the bottom, one per lane column.