fn git_common_dir(repo: &Path) -> Option<PathBuf>
The repo’s git common dir, resolved and canonicalised. A project checked out as a linked worktree or a submodule answers with the dir its gitdir lives under, not <repo>/.git.
<repo>/.git