mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 05:25:44 +01:00
fix bug in AbstractGitIncomingOutgoingCommand
This commit is contained in:
@@ -135,7 +135,7 @@ public abstract class AbstractGitIncomingOutgoingCommand
|
||||
|
||||
Git git = Git.wrap(open());
|
||||
|
||||
GitUtil.fetch(git, handler.getDirectory(repository), remoteRepository);
|
||||
GitUtil.fetch(git, handler.getDirectory(remoteRepository), remoteRepository);
|
||||
|
||||
ObjectId localId = GitUtil.getRepositoryHead(git.getRepository());
|
||||
ObjectId remoteId = null;
|
||||
|
||||
@@ -33,24 +33,11 @@ package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.io.Closeables;
|
||||
|
||||
import org.eclipse.jgit.api.FetchCommand;
|
||||
import org.eclipse.jgit.api.Git;
|
||||
import org.eclipse.jgit.api.LogCommand;
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.transport.RefSpec;
|
||||
|
||||
import sonia.scm.repository.Changeset;
|
||||
import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.GitChangesetConverter;
|
||||
import sonia.scm.repository.GitRepositoryHandler;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
|
||||
@@ -58,10 +45,6 @@ import sonia.scm.repository.RepositoryException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -84,14 +67,6 @@ public class GitIncomingCommand extends AbstractGitIncomingOutgoingCommand
|
||||
super(handler, context, repository);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean retrieveChangesets(ObjectId localId, ObjectId remoteId)
|
||||
{
|
||||
return remoteId != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -137,4 +112,19 @@ public class GitIncomingCommand extends AbstractGitIncomingOutgoingCommand
|
||||
|
||||
logCommand.add(remoteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param localId
|
||||
* @param remoteId
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected boolean retrieveChangesets(ObjectId localId, ObjectId remoteId)
|
||||
{
|
||||
return remoteId != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user