Skip to main content

is_worktree_clean

Function is_worktree_clean 

Source
pub async fn is_worktree_clean(repo_path: PathBuf) -> Result<bool, GitError>
Expand description

Re-exported commit/sync/diff APIs. Returns whether a repository or worktree has no uncommitted changes.

§Arguments

  • repo_path - Path to the git repository or worktree

§Returns

true when git status --porcelain is empty, false otherwise.

§Errors

Returns a GitError if git status --porcelain cannot be executed.