Rename GitDBLocal as LocalGitDB
This commit is contained in:
parent
837032b205
commit
8aabdf8be3
2 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,7 @@ public interface GitDB {
|
||||||
final String userName,
|
final String userName,
|
||||||
final String userEmailAddress
|
final String userEmailAddress
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
return GitDBLocal.init(dbDir, userName, userEmailAddress);
|
return LocalGitDB.init(dbDir, userName, userEmailAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +58,7 @@ public interface GitDB {
|
||||||
* @return a GitDB instance for the local gitdb
|
* @return a GitDB instance for the local gitdb
|
||||||
*/
|
*/
|
||||||
static GitDB openLocal(final Path dbDir, final String userName, final String userEmailAddress) {
|
static GitDB openLocal(final Path dbDir, final String userName, final String userEmailAddress) {
|
||||||
return GitDBLocal.open(dbDir, userName, userEmailAddress);
|
return LocalGitDB.open(dbDir, userName, userEmailAddress);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Optional;
|
||||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GitDBLocal implements GitDB {
|
class LocalGitDB implements GitDB {
|
||||||
|
|
||||||
private static final String NOT_A_BARE_REPO = "Not a bare repo";
|
private static final String NOT_A_BARE_REPO = "Not a bare repo";
|
||||||
private static final String ERROR_OPENING_REPOSITORY = "Error opening repository";
|
private static final String ERROR_OPENING_REPOSITORY = "Error opening repository";
|
||||||
|
@ -61,7 +61,7 @@ class GitDBLocal implements GitDB {
|
||||||
return Optional.of(Git.open(dbDir.toFile()))
|
return Optional.of(Git.open(dbDir.toFile()))
|
||||||
.map(Git::getRepository)
|
.map(Git::getRepository)
|
||||||
.filter(Repository::isBare)
|
.filter(Repository::isBare)
|
||||||
.map(repository -> new GitDBLocal(repository, userName, userEmailAddress))
|
.map(repository -> new LocalGitDB(repository, userName, userEmailAddress))
|
||||||
.orElseThrow(() -> new InvalidRepositoryException(NOT_A_BARE_REPO, dbDir));
|
.orElseThrow(() -> new InvalidRepositoryException(NOT_A_BARE_REPO, dbDir));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new InvalidRepositoryException(ERROR_OPENING_REPOSITORY, dbDir, e);
|
throw new InvalidRepositoryException(ERROR_OPENING_REPOSITORY, dbDir, e);
|
Loading…
Reference in a new issue