Skip to main content

is_dirty

Function is_dirty 

Source
pub fn is_dirty(directory: &Path) -> bool
Expand description

Returns true if the repo contains any uncommitted or unstaged changes.

This uses git status --porcelain, which outputs a line for each changed file. Any non-empty output means the repo is dirty.

ยงArguments

  • directory - Path to the project directory