Skip to main content

aqc_git_helpers/
lib.rs

1//! Read-only Git worktree state for Specular lock/verify.
2//!
3//! Runs `git status --porcelain=v1 -z` as a subprocess and parses the
4//! NUL-separated records. No commits, merges, or object-database access.
5//! Disk existence is `aqc-filetree`; Git change detection is this crate.
6//! Contract: `plan.md` in this directory.
7
8#![expect(
9    clippy::type_complexity,
10    reason = "Result<Vec<...>, Error> return shapes exceed the strict workspace threshold; the shapes are the crate's declared contract, stated openly rather than aliased away."
11)]
12
13// Dev-dependency linked into the lib's test build but exercised only by the
14// integration tests in `tests/`.
15#[cfg(test)]
16use tempfile as _;
17
18mod error;
19mod git;
20mod porcelain;
21mod queries;
22mod status;
23
24#[cfg(feature = "api")]
25pub use error::GitError;
26#[cfg(feature = "api")]
27pub use git::worktree_changes;
28#[cfg(feature = "api")]
29pub use porcelain::parse_porcelain_v1z;
30#[cfg(feature = "api")]
31pub use queries::changes_affecting_paths;
32#[cfg(feature = "api")]
33pub use queries::dirty_paths;
34#[cfg(feature = "api")]
35pub use queries::is_worktree_clean;
36#[cfg(feature = "api")]
37pub use status::ChangeStatus;
38#[cfg(feature = "api")]
39pub use status::ColumnChange;
40#[cfg(feature = "api")]
41pub use status::PORCELAIN_VERSION;
42#[cfg(feature = "api")]
43pub use status::PorcelainOptions;
44#[cfg(feature = "api")]
45pub use status::WorktreeChange;