Skip to main content

Module git_tui

Module git_tui 

Source
Expand description

Git TUI — interactive overlay for git status, diff viewing, staging, commit.

Module layout (built incrementally across tasks 11a/11b):

  • diff_doc — unified diff parser + whitespace/formatting filters (pure)
  • stategit status --porcelain -z parser (pure)
  • keys — keymap → GitKeyAction (pure)
  • git_io — thin std::process::Command wrappers around git (impure)
  • render — ratatui pane layout + pairing math (pure layout, impure draw)

GitTuiState here is the interactive overlay’s source of truth — it composes the pure data modules above and exposes mutating methods that shell out to git_io for state changes (add/restore --staged/commit).

Re-exports§

pub use diff_doc::DiffDocument;
pub use diff_doc::DiffFile;
pub use diff_doc::DiffLine;
pub use diff_doc::DiffLineKind;
pub use diff_doc::DiffViewMode;
pub use diff_doc::Hunk;
pub use diff_doc::WhitespaceMode;
pub use diff_doc::filter_whitespace;
pub use diff_doc::parse_unified_diff;
pub use git_io::diff_head;
pub use git_io::run_git;
pub use git_io::status_porcelain_z;
pub use keys::GitKeyAction;
pub use keys::match_git_key;
pub use render::RenderPlan;
pub use render::hunk_scroll_offset;
pub use render::pair_split_view;
pub use render::plan_overlay;
pub use render::render_overlay_lines;
pub use render::render_sidebar_rows;
pub use state::StatusEntry;
pub use state::parse_status_porcelain_z;

Modules§

diff_doc
Unified-diff parsing + whitespace/formatting filters.
git_io
Thin wrappers around the git binary for the TUI overlay.
keys
Keymap for the git TUI overlay.
render
Render layer for the git TUI overlay.
state
Git status — git status --porcelain -z parsing.

Structs§

GitTuiState
Interactive overlay state. One instance per open /git session.