mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 20:15:52 +01:00
use jgit java7 support, to improve git performance
This commit is contained in:
@@ -198,8 +198,6 @@ public final class GitUtil
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws GitAPIException
|
||||
*
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
public static FetchResult fetch(Git git, File directory,
|
||||
@@ -376,7 +374,7 @@ public final class GitUtil
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.warn("error occured during resolve of branch id", ex);
|
||||
}
|
||||
@@ -582,7 +580,7 @@ public final class GitUtil
|
||||
String revision)
|
||||
throws IOException
|
||||
{
|
||||
ObjectId revId = null;
|
||||
ObjectId revId;
|
||||
|
||||
if (Util.isNotEmpty(revision))
|
||||
{
|
||||
|
||||
@@ -51,10 +51,8 @@ public class AbstractGitCommand
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param context
|
||||
* @param repository
|
||||
* @param repositoryDirectory
|
||||
*/
|
||||
protected AbstractGitCommand(GitContext context,
|
||||
sonia.scm.repository.Repository repository)
|
||||
|
||||
@@ -80,10 +80,7 @@ public class GitContext implements Closeable
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("close git repository {}", directory);
|
||||
}
|
||||
logger.trace("close git repository {}", directory);
|
||||
|
||||
GitUtil.close(repository);
|
||||
repository = null;
|
||||
@@ -101,10 +98,7 @@ public class GitContext implements Closeable
|
||||
{
|
||||
if (repository == null)
|
||||
{
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("open git repository {}", directory);
|
||||
}
|
||||
logger.trace("open git repository {}", directory);
|
||||
|
||||
repository = GitUtil.open(directory);
|
||||
}
|
||||
@@ -115,7 +109,7 @@ public class GitContext implements Closeable
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private File directory;
|
||||
private final File directory;
|
||||
|
||||
/** Field description */
|
||||
private org.eclipse.jgit.lib.Repository repository;
|
||||
|
||||
Reference in New Issue
Block a user