Skip to main content

resolve_layout

Function resolve_layout 

Source
pub fn resolve_layout(cwd: &Path) -> Result<RepoLayout, u8>
Expand description

Resolve the RepoLayout a command operates on (#493 Phase 1): pointer-following discovery. A .mkit DIRECTORY (or none at all) resolves to the classic single-worktree layout exactly as before; a .mkit pointer FILE resolves to the linked tree’s split layout. On a broken pointer the error has already been printed and the returned code is the exit status to propagate — a broken linked tree must never silently operate on the wrong directory. Command code must obtain its layout HERE and never construct one ad hoc.