mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
壊れた場所を修正
This commit is contained in:
parent
d23e8510db
commit
95dafdebe5
|
@ -1,11 +1,13 @@
|
|||
package one.nem.lacerta.source.jgit;
|
||||
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
public interface JGitRepository {
|
||||
|
||||
// リポジトリ取得
|
||||
org.eclipse.jgit.lib.Repository getRepository(String id);
|
||||
Repository getRepository(String id);
|
||||
// リポジトリ作成
|
||||
org.eclipse.jgit.lib.Repository createRepository(String id);
|
||||
Repository createRepository(String id);
|
||||
// リポジトリ削除
|
||||
void deleteRepository(String id);
|
||||
// リポジトリ存在確認
|
||||
|
|
|
@ -6,6 +6,8 @@ import javax.inject.Inject;
|
|||
|
||||
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
|
||||
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
import org.eclipse.jgit.lib.RepositoryBuilder;
|
||||
|
||||
public class JGitRepositoryImpl implements JGitRepository {
|
||||
|
@ -18,7 +20,7 @@ public class JGitRepositoryImpl implements JGitRepository {
|
|||
}
|
||||
|
||||
@Override
|
||||
public org.eclipse.jgit.lib.Repository getRepository(String id) {
|
||||
public Repository getRepository(String id) {
|
||||
RepositoryBuilder repositoryBuilder = new RepositoryBuilder();
|
||||
repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile());
|
||||
repositoryBuilder.setMustExist(true);
|
||||
|
@ -30,7 +32,7 @@ public class JGitRepositoryImpl implements JGitRepository {
|
|||
}
|
||||
|
||||
@Override
|
||||
public org.eclipse.jgit.lib.Repository createRepository(String id) {
|
||||
public Repository createRepository(String id) {
|
||||
RepositoryBuilder repositoryBuilder = new RepositoryBuilder();
|
||||
repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile());
|
||||
repositoryBuilder.setMustExist(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user