pub fn has_changes(path: &Path) -> Result<bool>
Check if a worktree has any uncommitted changes (staged, unstaged, or untracked).