import { type Repo } from './repo.ts'; import type { TreeEntry } from './tree.ts'; /** One changed path as the diffstat table renders it. */ export interface FileStat { readonly path: string; /** Lines added, 0 for a binary file. */ readonly insertions: number; /** Lines removed, 0 for a binary file. */ readonly deletions: number; /** Whether either side sniffs as binary. */ readonly binary: boolean; /** Byte length of the old blob, 0 when created. */ readonly oldSize: number; /** Byte length of the new blob, 0 when deleted. */ readonly newSize: number; } /** * Per-path change counts between two trees, in path order. * * A binary file (NUL in the first 8000 bytes of either side, git's own sniff) * counts zero lines; a mode-only change counts zero too but still occupies a * row, which is how git prints `path | 0`. */ export declare function diffstat(repo: Repo, before: ReadonlyMap, after: ReadonlyMap): Promise; /** * git's diffstat table: one row per path, then the summary line. * * The geometry is diff.c's show_stats pinned against git 2.50 at the piped * default of 80 columns: the graph is capped at three eighths of the line, * the name column takes what remains, and per-file graphs scale linearly with * a floor of one mark per nonzero side. */ export declare function statTable(stats: readonly FileStat[], width?: number): string[]; /** * What `git commit` prints once the commit exists. * * The counts come from `diffstat`, so a binary file adds to the file total * but zero lines, exactly as git reports it. * * @param repo the opened repository * @param oid the commit just written * @param message its message * @param branch the branch it landed on, null when detached * @param before the parent tree * @param after the new tree * @param width how many hex digits to abbreviate the id to * @param root whether this is the repository's first commit */ export declare function report(repo: Repo, oid: string, message: string, branch: string | null, before: ReadonlyMap, after: ReadonlyMap, width: number, root: boolean): Promise; //# sourceMappingURL=summary.d.ts.map