Skip to main content

inspect

Function inspect 

Source
pub fn inspect(path: &Path) -> Result<Candidate, String>
Expand description

What: Read the registration of a worktree path: its .git file, its administrative directory, and the back-pointer. Why: Only a linked worktree whose administrative directory names this very path back is converted; anything else (the main checkout, a submodule, a stale registration) is refused with the reason.

In TS you’d write (pseudocode):

function inspect(path: string): Candidate; // throws the reason