mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
use jgit java7 support, to improve git performance
This commit is contained in:
@@ -30,11 +30,21 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import org.eclipse.jgit.api.Git;
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@@ -81,6 +91,25 @@ public class GitUtilTest
|
||||
GitUtil.checkBranchName(repo, GitUtil.REF_HEAD_PREFIX.concat("develop"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @throws GitAPIException
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
public void testOpenJava7() throws GitAPIException, IOException
|
||||
{
|
||||
File dir = temp.newFolder();
|
||||
|
||||
Git.init().setDirectory(dir).setBare(true).call();
|
||||
|
||||
org.eclipse.jgit.lib.Repository repo = GitUtil.open(dir);
|
||||
|
||||
assertThat(repo.getFS().getClass().getName(), containsString("Java7"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -98,4 +127,10 @@ public class GitUtilTest
|
||||
|
||||
return repo;
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
@Rule
|
||||
public TemporaryFolder temp = new TemporaryFolder();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user