initEventLogRepo function
Create the log repo if needed (a plain git init).
Implementation
Future<void> initEventLogRepo(String repo) async {
try {
await gitText(repo, ['rev-parse', '--git-dir']);
} catch (_) {
final result = await Process.run('git', ['init', '-q', repo]);
if (result.exitCode != 0) {
throw StateError('git init failed for $repo');
}
}
}