Expand description
diffstat API (re-exported at this path).
Structs§
- Diffstat
Options - Options for laying out diffstat lines (Git
diff_optionsstat fields). - File
Stat Input FileStatInputstruct.
Constants§
- FORMAT_
PATCH_ STAT_ WIDTH - Default total width for
format-patchdiffstat (MAIL_DEFAULT_WRAPin Git).
Functions§
- display_
width_ minus_ ansi - Visible terminal width of
s, skipping ANSI CSI sequences (like Gitutf8_strnwidth(..., 1)). - format_
single_ stat_ line - Format a single per-file
--statline at a fixed total width (Gitshow_stats). - terminal_
columns term_columns()approximation:COLUMNSenv, then TTY width, then 80.- write_
diffstat_ block - Write diffstat lines and summary, matching Git’s layout.