pub fn repo_root(path: &Path) -> Option<PathBuf>Expand description
The git work-tree root at or above path — the nearest ancestor holding a
.git entry — found without shelling out. .git may be a directory or a
file (worktrees, submodules), so we test existence either way. None when
path is not inside a work tree.