pub fn add_detached(
project_root: &Path,
path: &Path,
commitish: &str,
) -> Result<(), WorktreeError>Expand description
Add a worktree checked out at commitish in detached HEAD state.
Used for the static reference snapshot: a branch already checked out in the main worktree cannot be checked out again, but it can be snapshotted detached at its tip.