Skip to main content

Module status

Module status 

Source
Expand description

Git status and porcelain parsing operations.

This module provides functions for parsing git status output, tracking path snapshots, and ensuring files remain unchanged during operations.

§Invariants

  • Porcelain parsing must handle NUL-terminated format correctly
  • Path snapshots are deterministic and comparable

§What this does NOT handle

  • Commit operations (see git/commit.rs)
  • LFS validation (see git/lfs.rs)
  • Repository cleanliness enforcement (see git/clean.rs)

Structs§

PathSnapshot
A snapshot of a file path with a fingerprint for detecting changes.

Functions§

ensure_paths_unchanged
Validate that each baseline dirty path is unchanged from its fingerprint.
ignored_paths
Returns a list of gitignored paths (tracked ignore + local excludes).
is_path_ignored
Returns true if rel_path is ignored by git (respecting .gitignore, .git/info/exclude, and global excludes).
snapshot_paths
Create deterministic fingerprints for a list of baseline dirty paths.
status_paths
Returns a list of paths from git status.
status_porcelain
Returns raw git status --porcelain -z output (may be empty).