repoRoot function
Get the repository root directory.
Implementation
Future<String?> repoRoot({String? dir}) async {
final result = await runGit([
'rev-parse',
'--show-toplevel',
], workingDirectory: dir);
return result.success ? result.output : null;
}