findCanonicalGitRoot function

String? findCanonicalGitRoot(
  1. String startPath
)

Find the canonical git root, resolving through worktrees.

Implementation

String? findCanonicalGitRoot(String startPath) {
  final root = findGitRoot(startPath);
  if (root == null) return null;
  return resolveCanonicalGitRoot(root);
}