Skip to main content

Module apply

Module apply 

Source
Expand description

Unified/git-diff patch parsing for grit apply.

This is the self-contained parse core extracted from grit apply: it turns patch text into structured FilePatch/Hunk data with no I/O, no environment access, and no CLI dependencies. The worktree/index application engine and all CLI output still live in the grit crate; only the text-to-structured-data layer lives here so it can be unit-tested and reused as a library.

Structs§

BinaryPatchPayload
Binary patch payload as compressed base85 chunks for forward/reverse apply.
FilePatch
Represents one file in a unified diff.
Hunk
A single hunk in a unified diff.

Enums§

HunkLine

Functions§

inflate_binary_payload
Inflate zlib-compressed binary payload.
parse_patch
Parse a unified diff into a list of FilePatch entries.