fix bug in AbstractGitIncomingOutgoingCommand

This commit is contained in:
Sebastian Sdorra
2013-05-10 19:31:57 +02:00
parent a2999c9ad6
commit 65e400345b
2 changed files with 16 additions and 26 deletions

View File

@@ -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;

View File

@@ -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;
}
}