Expand description
The diff document: what a build extracted from git, plus the parser that
turns raw git diff text into typed data.
parse_unified_diff is a pure function &str -> Vec<FileDiff> — the CLI
feeds it git diff --no-color --no-ext-diff --find-renames output. Nothing
here shells out.
Structs§
- Commit
- One commit in the diffed range.
- Diff
Document - The immutable build artifact: one rendered diff between two pinned refs.
- File
Diff - One file’s change.
old_path/new_pathareNonewhere the file does not exist on that side (added / deleted). - Hunk
- One contiguous run of diff lines.
- Notes
File - A notes file lifted out of the diff and presented as a page panel.
Enums§
- File
Status - How a file changed. Serialized as the bare
CamelCasevariant name ("Added"/"Deleted"/"Modified"/"Renamed"). - Line
- One diff line. Encoded as a single-key union —
{ "Add": { "new": 2, "text": "…" } }— with no discriminator field. Line numbers are 1-based and refer to the side named by the field (old= pre-image,new= post-image) — the same coordinates comments anchor to.
Functions§
- parse_
unified_ diff - Parse
git diffunified output (with--find-renames) into typed files.