Expand description
Repository cleanliness validation.
This module provides functions for validating that a repository is in a clean state, with support for allowing specific paths to be dirty (e.g., Ralph’s own configuration files).
§Invariants
- Allowed paths must be normalized before comparison
- Directory prefixes work with or without trailing slashes
- Force flag bypasses all checks
§What this does NOT handle
- Actual git operations (see git/commit.rs)
- Status parsing details (see git/status.rs)
- LFS validation (see git/lfs.rs)
Constants§
- RALPH_
RUN_ CLEAN_ ALLOWED_ PATHS - Paths that are allowed to be dirty during Ralph runs.
Functions§
- repo_
dirty_ only_ allowed_ paths - Returns true when the repo has dirty paths and every dirty path is allowed.
- require_
clean_ repo_ ignoring_ paths - Require a clean repository, ignoring allowed paths.