Skip to main content

canonical_worktree_root

Function canonical_worktree_root 

Source
fn canonical_worktree_root(root: &Path) -> PathBuf
Expand description

For a linked worktree, the main checkout that owns it; otherwise root (the CLI’s ke/Ht). Anything that doesn’t check out — a .git file that isn’t gitdir:, a missing commondir, a worktree whose gitdir doesn’t point back — leaves root as it is, as the CLI does.