pub fn get_root(repo: &Repository) -> PathBufExpand description
Absolute working tree root path for the repository (or worktree).
Uses Repository::workdir which returns the correct root for both regular
repositories and linked worktrees. Falls back to Repository::commondir
(with .git stripped) for bare repositories.