getIsGit function

Future<bool> getIsGit({
  1. String? cwd,
})

Check if cwd is inside a git repository.

Implementation

Future<bool> getIsGit({String? cwd}) async {
  return findGitRoot(cwd ?? Directory.current.path) != null;
}