update jgit to 3.0.0.201306101825-r

This commit is contained in:
Sebastian Sdorra
2013-07-08 14:54:44 +02:00
parent fdac4ff01f
commit d2777df1d4
4 changed files with 27 additions and 30 deletions

View File

@@ -38,7 +38,6 @@ package sonia.scm.repository;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import sonia.scm.Type;
@@ -259,19 +258,19 @@ public class GitRepositoryHandler
protected void create(Repository repository, File directory)
throws RepositoryException, IOException
{
FileRepository fr = null;
org.eclipse.jgit.lib.Repository gitRepository = null;
try
{
fr = new FileRepositoryBuilder().setGitDir(
gitRepository = new FileRepositoryBuilder().setGitDir(
directory).readEnvironment().findGitDir().build();
fr.create(true);
gitRepository.create(true);
}
finally
{
if (fr != null)
if (gitRepository != null)
{
fr.close();
gitRepository.close();
}
}
}

View File

@@ -30,13 +30,14 @@
*/
package sonia.scm.repository.spi;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.base.Preconditions;
import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.internal.storage.file.FileRepository;
import sonia.scm.repository.GitRepositoryHandler;
import sonia.scm.repository.GitUtil;