Skip to main content

git_spawn/
parse.rs

1//! Typed parsers for common git outputs.
2//!
3//! Enabled by the `parse` feature (on by default). Each parser takes a raw
4//! [`&str`](str) of git output (typically captured via
5//! [`CommandOutput::stdout`](crate::CommandOutput)) and returns structured
6//! entries. Parsers are deliberately permissive: unexpected fields are
7//! preserved in raw form rather than erroring, so callers can handle them
8//! downstream.
9//!
10//! # Modules
11//!
12//! - [`status`] — parse `git status --porcelain=v1 -z` output
13//! - [`log`] — parse `git log` output using a fixed format token string
14//! - [`diff`] — parse `git diff --name-status -z` output
15//! - [`notes`] — parse `git notes list` output into `(note, object)` pairs
16
17pub mod diff;
18pub mod log;
19pub mod notes;
20pub mod status;
21
22pub use diff::{DiffEntry, DiffKind, parse_diff_name_status};
23pub use log::{CommitEntry, LOG_FORMAT, parse_log};
24pub use notes::parse_notes_list;
25pub use status::{StatusEntry, StatusKind, parse_status};