| Crates.io | workspacer-ensure-git-clean |
| lib.rs | workspacer-ensure-git-clean |
| version | 0.1.1 |
| created_at | 2025-04-01 21:30:30.761512+00 |
| updated_at | 2025-04-01 21:30:30.761512+00 |
| description | Asserts and enforces a clean Git workspace state prior to critical operations. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1615622 |
| size | 140,814 |
workspacer-ensure-git-clean is a crate intended for Rust engineers who require certainty in the cleanliness of a Git workspace before performing operations that should not proceed in a dirty state, such as deployment or integration tasks.
The crate provides a utility to assert and enforce that a Git workspace is devoid of uncommitted changes or untracked files. This ensures the integrity and consistency of operations that are dependent on a stable code base.
git status.To incorporate it into your Rust project, add it to your Cargo.toml:
[dependencies]
workspacer-ensure-git-clean = "0.1.0"
Then, in your Rust source file:
use workspacer_ensure_git_clean::ensure_clean;
fn main() {
ensure_clean().expect("Workspace must be clean before proceeding.");
}
This crate makes use of the Rust 2024 edition and assumes familiarity with Git operations at a technical level. It leverages underlying system Git commands to ascertain state, requiring that Git is installed and available in the environment where the Rust code is executed.
Contributions via the standard GitHub pull request workflow are welcomed, especially regarding expanded platform support and enhancing feedback clarity in diverse environments.