pub fn create(volume_root: &Path, run_id: &str) -> Result<PathBuf, Error>Expand description
Create a detached-HEAD worktree at .omne/wt/<run_id>.
Returns the absolute (or volume-relative, as git prints it)
worktree path on success. The parent .omne/wt/ directory is
created on demand so create is safe to call before scaffold has
ever touched the worktree root (useful in tests).
create does not call preflight_volume_path_length —
omne run runs preflight earlier so failures surface before any
ULID is minted. Callers invoking create directly must run
preflight themselves if they want early path-length diagnosis.
Errors:
AlreadyExistsif the target path exists before the git call.NotAGitRepoifgitreports the volume root is not a repo.GitTimeoutif the subprocess exceedsGIT_TIMEOUT.GitCommandFailedfor any other non-zerogitexit.Ioif thegitbinary cannot be launched.