Skip to main content

Module text_diff

Module text_diff 

Source
Expand description

The workspace’s single line-diff owner.

Every unified-diff renderer in the codebase — orchestration run-record diffs, the ast.dry_run preview, and the harn package publish index preview — routes through render_line_diff so the algorithm choice and context radius live in exactly one place. Callers supply their own file header (--- a/… / +++ b/…, /dev/null, etc.); this module owns the @@ hunk body and the +/- line counts.

Structs§

LineChange
Expanded line operation with one-based coordinates on both sides.
LineDiff
A rendered line diff: the unified-diff hunk body plus raw +/- counts.
LineDiffOptions
Work requested from the shared line-diff engine.

Enums§

LineChangeKind
One line in an expanded edit script.

Functions§

compute_line_diff
Compute one line diff and project only the representations a caller needs.
render_line_diff
Diff before against after line by line.