initCachedGit function

Future<void> initCachedGit(
  1. Directory testDir, {
  2. bool isEolLfEnabled = true,
})

Cached variant of initGit: same result, but built once per isolate.

Implementation

Future<void> initCachedGit(
  Directory testDir, {
  bool isEolLfEnabled = true,
}) async {
  await initCachedRepo(
    testDir,
    key: 'gg_git/initGit(isEolLfEnabled: $isEolLfEnabled)',
    build: (repo) => initGit(repo, isEolLfEnabled: isEolLfEnabled),
  );
}