async fn numstat(
cwd: &Path,
args: &[&str],
budget: Duration,
) -> Result<GitDiffStats, NumstatError>Expand description
Run git <args> and parse the --numstat output. Returns the
top-TOP_FILE_COUNT files (sorted by total changes desc, alpha
tie-break) plus the full file count and overall add/remove
totals.
Returns Err(NumstatError) when the underlying git subprocess
hit Failed / Oversize; callers map that signal to
LayerState::ScanFailed so the renderer can distinguish “scan
failed” from “clean tree, nothing to show”. Empty (exit 0, no
stdout) collapses to a zero-row stats block since that’s the
legitimate “no diff to report” outcome.