pub fn get_worktree_status(
path: &Path,
repo: &Path,
branch: Option<&str>,
) -> StringExpand description
Determine the status of a worktree.
Status priority: stale > busy > active > merged > pr-open > modified > clean
Merge detection strategy:
gh pr view(primary) — works with all merge strategies (merge commit, squash merge, rebase merge) because GitHub tracks PR state independently of commit SHAs.git branch --merged(fallback) — only works when commit SHAs are preserved (merge commit strategy). Used whenghis not available.