mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
use try-with-resources for git repository
This commit is contained in:
@@ -172,10 +172,8 @@ public class GitLogCommand extends AbstractGitCommand implements LogCommand
|
||||
GitChangesetConverter converter = null;
|
||||
RevWalk revWalk = null;
|
||||
|
||||
try
|
||||
try (org.eclipse.jgit.lib.Repository gr = open())
|
||||
{
|
||||
org.eclipse.jgit.lib.Repository gr = open();
|
||||
|
||||
if (!gr.getAllRefs().isEmpty())
|
||||
{
|
||||
int counter = 0;
|
||||
|
||||
Reference in New Issue
Block a user