Skip to main content

Module clean

Module clean 

Source
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.