Clarify call to InitCommand
This commit is contained in:
parent
fa9481704a
commit
19b936a067
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
package net.kemitix.gitdb;
|
package net.kemitix.gitdb;
|
||||||
|
|
||||||
import org.eclipse.jgit.api.Git;
|
import org.eclipse.jgit.api.Git;
|
||||||
|
import org.eclipse.jgit.api.InitCommand;
|
||||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
@ -16,10 +17,9 @@ public interface GitDB
|
||||||
* @return a GitDB instance for the created local gitdb
|
* @return a GitDB instance for the created local gitdb
|
||||||
*/
|
*/
|
||||||
static GitDB initLocal(final Path dbDir) throws GitAPIException {
|
static GitDB initLocal(final Path dbDir) throws GitAPIException {
|
||||||
return new GitDBLocal(Git.init()
|
final InitCommand initCommand = Git.init().setGitDir(dbDir.toFile()).setBare(true);
|
||||||
.setGitDir(dbDir.toFile())
|
final Git git = initCommand.call();
|
||||||
.setBare(true)
|
return new GitDBLocal(git);
|
||||||
.call());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
Loading…
Reference in a new issue