Skip to main content

Module git

Module git 

Source

Structs§

DiffSection
Raw git diff output, optionally titled (e.g. “Staged changes”).
Repo
A handle to a git repository. Every command runs with the repository root as its working directory, so gitrat works when launched from a subdirectory.
Status
Snapshot of git status: the branch header plus the changed files.

Functions§

parse_status
Parses NUL-separated git status --porcelain=v1 -z --branch output.
sanitize
Expands tabs and replaces control characters (e.g. escape sequences in file contents) so they cannot corrupt the terminal.

Type Aliases§

GitResult
Result type used by git operations; the error is a human-readable message.