Delete commented code

Leave working examples of using Git
This commit is contained in:
Paul Campbell 2018-05-31 23:38:54 +01:00
parent 5ffdb0f895
commit 1098cd2e21
2 changed files with 108 additions and 201 deletions

View file

@ -27,9 +27,7 @@ import org.eclipse.jgit.api.errors.GitAPIException;
import java.nio.file.Path;
public interface GitDB
// extends Closeable
{
public interface GitDB {
/**
* Initialise a new local gitdb.
@ -43,42 +41,4 @@ public interface GitDB
return new GitDBLocal(git);
}
// /**
// * Open an existing local gitdb.
// *
// * @param dbDir the path to the local repo
// * @return a GitDB instance for the local gitdb
// */
// static GitDB local(final Path dbDir) throws IOException {
// return new GitDBLocal(Git.open(dbDir.toFile()));
// }
// /**
// * Select a branch.
// *
// * @param branch the branch to select
// * @return a branch within the gitdb
// */
// GitDbBranch branch(Branch branch);
// interface GitDbBranch {
// String get(Key key);
//
// <T> T get(Key key, Class<T> type);
//
// Key put(Message message, Document<String> document, Author author);
//
// GitDbBranch delete(Branch branch, Key key, Message message, Author author);
//
// GitDbBranch tag(Reference reference);
//
// Transaction startTransaction(Branch branch);
//
// GitDbBranch fork(Branch branch);
// }
// Stream<Branch> allBranches();
}

View file

@ -29,30 +29,10 @@ class GitDBLocal implements GitDB {
private final Git git;
// @Override
// public void close() {
// git.close();
// }
// @Override
// public GitDbBranch branch(Branch branch) {
// return null;
// }
//
// @Override
// public Stream<Branch> allBranches() {
// return null;
// }
// @Override
// public String get(Branch branch, Key key) {
// return get(branch, key, String.class);
// }
//
// @Override
// @SneakyThrows
// public <T> T get(Branch branch, Key key, Class<T> type) {
//branch
// //branch
// final RefDatabase refDatabase = repository.getRefDatabase();
// final String branchValue = branch.getValue();
// final Ref refDatabaseRef = refDatabase.getRef(branchValue);
@ -158,37 +138,4 @@ class GitDBLocal implements GitDB {
// return document.getValue();
// }
// @SneakyThrows
// private Optional<ObjectId> findParentCommit(final Branch branch) {
// return Optional.ofNullable(
// repository.getRefDatabase()
// .getRef(branch.getValue()))
// .map(Ref::getObjectId);
// }
// @Override
// public String delete(Branch branch, Key key, Message message, Author author) {
// return null;
// }
//
// @Override
// public void tag(Reference reference) {
//
// }
//
// @Override
// public void createBranch(Reference reference) {
//
// }
//
// @Override
// public Stream<String> getAllBranches() {
// return null;
// }
//
// @Override
// public Transaction createTransaction(Branch branch) {
// return null;
// }
}