Skip to main content

detect_busy

Function detect_busy 

Source
pub fn detect_busy(worktree: &Path) -> Vec<BusyInfo>
Expand description

Detect busy processes for a given worktree path.

Combines the lockfile signal and a process cwd scan. Filters out the current process tree so gw delete invoked from within the worktree does not self-report as busy.

Note: detect_busy calls lockfile::read_and_clean_stale, which removes lockfiles belonging to dead owners as a self-healing side effect. This means even read-only operations like gw list may mutate <worktree>/.git/gw-session.lock when a stale file is encountered.