Skip to main content

Module parse

Module parse 

Source
Available on crate feature parse only.
Expand description

Typed parsers for common git outputs.

Enabled by the parse feature (on by default). Each parser takes a raw &str of git output (typically captured via CommandOutput::stdout) and returns structured entries. Parsers are deliberately permissive: unexpected fields are preserved in raw form rather than erroring, so callers can handle them downstream.

§Modules

  • status — parse git status --porcelain=v1 -z output
  • log — parse git log output using a fixed format token string
  • diff — parse git diff --name-status -z output

Re-exports§

pub use diff::DiffEntry;
pub use diff::DiffKind;
pub use diff::parse_diff_name_status;
pub use log::CommitEntry;
pub use log::LOG_FORMAT;
pub use log::parse_log;
pub use status::StatusEntry;
pub use status::StatusKind;
pub use status::parse_status;

Modules§

diff
Parser for git diff --name-status -z.
log
Parser for git log output using a fixed token format.
status
Parser for git status --porcelain=v1 -z.