openBare method

  1. @override
Future<GitFileBareRepository> openBare(
  1. String path
)
override

Opens path and returns it as a GitFileBareRepository.

Fails with GitNotABareRepositoryException when the repository has a work tree, and with GitNotARepositoryException when path is not a repository at all.

Implementation

@override
Future<GitFileBareRepository> openBare(String path) async {
  final ProcessGitRepository repository = await _open(path);
  if (repository is ProcessGitFileBareRepository) {
    return repository;
  }
  throw GitNotABareRepositoryException(path);
}