Skip to main content

classify_effective_target

Function classify_effective_target 

Source
pub fn classify_effective_target(
    identity: &WorktreeIdentity,
    allowed_dirs: &[PathBuf],
) -> EffectiveTarget
Expand description

What: Map a repository identity to the target worktree policies act on. Why: Bare and absent repositories have no worktree; a repository whose Git directory sits under an allowed tool cache is exempt before main/linked matters.

In TS you’d write (pseudocode):

function classifyEffectiveTarget(identity: WorktreeIdentity, allowedDirs: string[]): EffectiveTarget;