mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 12:05:52 +01:00
Remove redundant constructor parameter
The repository can be retrieved from the context and does not have to be passed through by every constructor
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -77,14 +77,12 @@ class AbstractGitCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
* @param context
|
||||
*
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
AbstractGitCommand(GitContext context,
|
||||
sonia.scm.repository.Repository repository)
|
||||
AbstractGitCommand(GitContext context)
|
||||
{
|
||||
this.repository = repository;
|
||||
this.repository = context.getRepository();
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -63,15 +63,12 @@ public abstract class AbstractGitIncomingOutgoingCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
AbstractGitIncomingOutgoingCommand(GitRepositoryHandler handler,
|
||||
GitContext context, Repository repository)
|
||||
AbstractGitIncomingOutgoingCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -67,15 +67,12 @@ public abstract class AbstractGitPushOrPullCommand extends AbstractGitCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
protected AbstractGitPushOrPullCommand(GitRepositoryHandler handler,
|
||||
GitContext context, sonia.scm.repository.Repository repository)
|
||||
protected AbstractGitPushOrPullCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -40,7 +40,6 @@ import sonia.scm.repository.BlameResult;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Person;
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -65,9 +64,9 @@ public class GitBlameCommand extends AbstractGitCommand implements BlameCommand
|
||||
|
||||
//~--- constructors ---------------------------------------------------------
|
||||
|
||||
public GitBlameCommand(GitContext context, Repository repository)
|
||||
public GitBlameCommand(GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import org.eclipse.jgit.api.Git;
|
||||
@@ -34,7 +34,6 @@ import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.PostReceiveRepositoryHookEvent;
|
||||
import sonia.scm.repository.PreReceiveRepositoryHookEvent;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.RepositoryHookEvent;
|
||||
import sonia.scm.repository.RepositoryHookType;
|
||||
import sonia.scm.repository.api.BranchRequest;
|
||||
@@ -57,8 +56,8 @@ public class GitBranchCommand extends AbstractGitCommand implements BranchComman
|
||||
private final HookContextFactory hookContextFactory;
|
||||
private final ScmEventBus eventBus;
|
||||
|
||||
GitBranchCommand(GitContext context, Repository repository, HookContextFactory hookContextFactory, ScmEventBus eventBus) {
|
||||
super(context, repository);
|
||||
GitBranchCommand(GitContext context, HookContextFactory hookContextFactory, ScmEventBus eventBus) {
|
||||
super(context);
|
||||
this.hookContextFactory = hookContextFactory;
|
||||
this.eventBus = eventBus;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -37,7 +37,6 @@ import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.repository.Branch;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -54,9 +53,9 @@ public class GitBranchesCommand extends AbstractGitCommand implements BranchesCo
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(GitBranchesCommand.class);
|
||||
|
||||
public GitBranchesCommand(GitContext context, Repository repository)
|
||||
public GitBranchesCommand(GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -51,7 +51,6 @@ import sonia.scm.repository.FileObject;
|
||||
import sonia.scm.repository.GitSubModuleParser;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.SubRepository;
|
||||
import sonia.scm.store.Blob;
|
||||
import sonia.scm.store.BlobStore;
|
||||
@@ -112,8 +111,8 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
|
||||
private int resultCount = 0;
|
||||
|
||||
public GitBrowseCommand(GitContext context, Repository repository, LfsBlobStoreFactory lfsBlobStoreFactory, SyncAsyncExecutor executor) {
|
||||
super(context, repository);
|
||||
public GitBrowseCommand(GitContext context, LfsBlobStoreFactory lfsBlobStoreFactory, SyncAsyncExecutor executor) {
|
||||
super(context);
|
||||
this.lfsBlobStoreFactory = lfsBlobStoreFactory;
|
||||
this.executor = executor;
|
||||
}
|
||||
@@ -326,8 +325,7 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
logger.debug("read submodules of {} at {}", repository.getName(), revId);
|
||||
|
||||
try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) {
|
||||
new GitCatCommand(context, repository, lfsBlobStoreFactory).getContent(repo, revId,
|
||||
PATH_MODULES, baos);
|
||||
new GitCatCommand(context, lfsBlobStoreFactory).getContent(repo, revId, PATH_MODULES, baos);
|
||||
return GitSubModuleParser.parse(baos.toString());
|
||||
} catch (NotFoundException ex) {
|
||||
logger.trace("could not find .gitmodules: {}", ex.getMessage());
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
@@ -61,8 +61,8 @@ public class GitCatCommand extends AbstractGitCommand implements CatCommand {
|
||||
|
||||
private final LfsBlobStoreFactory lfsBlobStoreFactory;
|
||||
|
||||
public GitCatCommand(GitContext context, sonia.scm.repository.Repository repository, LfsBlobStoreFactory lfsBlobStoreFactory) {
|
||||
super(context, repository);
|
||||
public GitCatCommand(GitContext context, LfsBlobStoreFactory lfsBlobStoreFactory) {
|
||||
super(context);
|
||||
this.lfsBlobStoreFactory = lfsBlobStoreFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import org.eclipse.jgit.diff.DiffEntry;
|
||||
import org.eclipse.jgit.diff.DiffFormatter;
|
||||
import org.eclipse.jgit.util.QuotedString;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.api.DiffCommandBuilder;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
@@ -42,8 +41,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
*/
|
||||
public class GitDiffCommand extends AbstractGitCommand implements DiffCommand {
|
||||
|
||||
GitDiffCommand(GitContext context, Repository repository) {
|
||||
super(context, repository);
|
||||
GitDiffCommand(GitContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,14 +21,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import org.eclipse.jgit.diff.DiffEntry;
|
||||
import org.eclipse.jgit.diff.DiffFormatter;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.api.DiffFile;
|
||||
import sonia.scm.repository.api.DiffResult;
|
||||
import sonia.scm.repository.api.Hunk;
|
||||
@@ -40,8 +39,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class GitDiffResultCommand extends AbstractGitCommand implements DiffResultCommand {
|
||||
|
||||
GitDiffResultCommand(GitContext context, Repository repository) {
|
||||
super(context, repository);
|
||||
GitDiffResultCommand(GitContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public DiffResult getDiffResult(DiffCommandRequest diffCommandRequest) throws IOException {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -30,7 +30,6 @@ import org.eclipse.jgit.api.LogCommand;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.GitRepositoryHandler;
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -47,15 +46,12 @@ public class GitIncomingCommand extends AbstractGitIncomingOutgoingCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
GitIncomingCommand(GitRepositoryHandler handler, GitContext context,
|
||||
Repository repository)
|
||||
GitIncomingCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(handler, context, repository);
|
||||
super(handler, context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -77,13 +77,12 @@ public class GitLogCommand extends AbstractGitCommand implements LogCommand
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param context
|
||||
*
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
GitLogCommand(GitContext context, sonia.scm.repository.Repository repository)
|
||||
GitLogCommand(GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
@@ -61,8 +61,8 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand
|
||||
MergeStrategy.SQUASH
|
||||
);
|
||||
|
||||
GitMergeCommand(GitContext context, sonia.scm.repository.Repository repository, GitWorkdirFactory workdirFactory) {
|
||||
super(context, repository);
|
||||
GitMergeCommand(GitContext context, GitWorkdirFactory workdirFactory) {
|
||||
super(context);
|
||||
this.workdirFactory = workdirFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -35,7 +35,6 @@ import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Modifications;
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
@@ -47,8 +46,8 @@ import static sonia.scm.ContextEntry.ContextBuilder.entity;
|
||||
@Slf4j
|
||||
public class GitModificationsCommand extends AbstractGitCommand implements ModificationsCommand {
|
||||
|
||||
protected GitModificationsCommand(GitContext context, Repository repository) {
|
||||
super(context, repository);
|
||||
protected GitModificationsCommand(GitContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private Modifications createModifications(TreeWalk treeWalk, RevCommit commit, RevWalk revWalk, String revision)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import com.google.common.util.concurrent.Striped;
|
||||
@@ -53,8 +53,8 @@ public class GitModifyCommand extends AbstractGitCommand implements ModifyComman
|
||||
private final GitWorkdirFactory workdirFactory;
|
||||
private final LfsBlobStoreFactory lfsBlobStoreFactory;
|
||||
|
||||
GitModifyCommand(GitContext context, Repository repository, GitWorkdirFactory workdirFactory, LfsBlobStoreFactory lfsBlobStoreFactory) {
|
||||
super(context, repository);
|
||||
GitModifyCommand(GitContext context, GitWorkdirFactory workdirFactory, LfsBlobStoreFactory lfsBlobStoreFactory) {
|
||||
super(context);
|
||||
this.workdirFactory = workdirFactory;
|
||||
this.lfsBlobStoreFactory = lfsBlobStoreFactory;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -30,7 +30,6 @@ import org.eclipse.jgit.api.LogCommand;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import sonia.scm.repository.ChangesetPagingResult;
|
||||
import sonia.scm.repository.GitRepositoryHandler;
|
||||
import sonia.scm.repository.Repository;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -47,15 +46,12 @@ public class GitOutgoingCommand extends AbstractGitIncomingOutgoingCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
GitOutgoingCommand(GitRepositoryHandler handler, GitContext context,
|
||||
Repository repository)
|
||||
GitOutgoingCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(handler, context, repository);
|
||||
super(handler, context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -70,15 +70,12 @@ public class GitPullCommand extends AbstractGitPushOrPullCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
public GitPullCommand(GitRepositoryHandler handler, GitContext context,
|
||||
Repository repository)
|
||||
public GitPullCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(handler, context, repository);
|
||||
super(handler, context);
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -29,7 +29,6 @@ package sonia.scm.repository.spi;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.repository.GitRepositoryHandler;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.api.PushResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -53,15 +52,12 @@ public class GitPushCommand extends AbstractGitPushOrPullCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param handler
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
public GitPushCommand(GitRepositoryHandler handler, GitContext context,
|
||||
Repository repository)
|
||||
public GitPushCommand(GitRepositoryHandler handler, GitContext context)
|
||||
{
|
||||
super(handler, context, repository);
|
||||
super(handler, context);
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
@@ -58,7 +58,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
Command.LOG,
|
||||
Command.TAGS,
|
||||
Command.BRANCH,
|
||||
Command.BRANCHES,
|
||||
Command.BRANCHES,
|
||||
Command.INCOMING,
|
||||
Command.OUTGOING,
|
||||
Command.PUSH,
|
||||
@@ -73,7 +73,6 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
|
||||
public GitRepositoryServiceProvider(GitRepositoryHandler handler, Repository repository, GitRepositoryConfigStoreProvider storeProvider, LfsBlobStoreFactory lfsBlobStoreFactory, HookContextFactory hookContextFactory, ScmEventBus eventBus, SyncAsyncExecutorProvider executorProvider) {
|
||||
this.handler = handler;
|
||||
this.repository = repository;
|
||||
this.lfsBlobStoreFactory = lfsBlobStoreFactory;
|
||||
this.hookContextFactory = hookContextFactory;
|
||||
this.eventBus = eventBus;
|
||||
@@ -106,7 +105,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public BlameCommand getBlameCommand()
|
||||
{
|
||||
return new GitBlameCommand(context, repository);
|
||||
return new GitBlameCommand(context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +117,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public BranchesCommand getBranchesCommand()
|
||||
{
|
||||
return new GitBranchesCommand(context, repository);
|
||||
return new GitBranchesCommand(context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +129,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public BranchCommand getBranchCommand()
|
||||
{
|
||||
return new GitBranchCommand(context, repository, hookContextFactory, eventBus);
|
||||
return new GitBranchCommand(context, hookContextFactory, eventBus);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +141,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public BrowseCommand getBrowseCommand()
|
||||
{
|
||||
return new GitBrowseCommand(context, repository, lfsBlobStoreFactory, executorProvider.createExecutorWithDefaultTimeout());
|
||||
return new GitBrowseCommand(context, lfsBlobStoreFactory, executorProvider.createExecutorWithDefaultTimeout());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +153,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public CatCommand getCatCommand()
|
||||
{
|
||||
return new GitCatCommand(context, repository, lfsBlobStoreFactory);
|
||||
return new GitCatCommand(context, lfsBlobStoreFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,12 +165,12 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public DiffCommand getDiffCommand()
|
||||
{
|
||||
return new GitDiffCommand(context, repository);
|
||||
return new GitDiffCommand(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiffResultCommand getDiffResultCommand() {
|
||||
return new GitDiffResultCommand(context, repository);
|
||||
return new GitDiffResultCommand(context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -183,7 +182,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public IncomingCommand getIncomingCommand()
|
||||
{
|
||||
return new GitIncomingCommand(handler, context, repository);
|
||||
return new GitIncomingCommand(handler, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,12 +194,12 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public LogCommand getLogCommand()
|
||||
{
|
||||
return new GitLogCommand(context, repository);
|
||||
return new GitLogCommand(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModificationsCommand getModificationsCommand() {
|
||||
return new GitModificationsCommand(context,repository);
|
||||
return new GitModificationsCommand(context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,7 +211,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public OutgoingCommand getOutgoingCommand()
|
||||
{
|
||||
return new GitOutgoingCommand(handler, context, repository);
|
||||
return new GitOutgoingCommand(handler, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,7 +223,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public PullCommand getPullCommand()
|
||||
{
|
||||
return new GitPullCommand(handler, context, repository);
|
||||
return new GitPullCommand(handler, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,7 +235,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public PushCommand getPushCommand()
|
||||
{
|
||||
return new GitPushCommand(handler, context, repository);
|
||||
return new GitPushCommand(handler, context);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,17 +259,17 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
@Override
|
||||
public TagsCommand getTagsCommand()
|
||||
{
|
||||
return new GitTagsCommand(context, repository);
|
||||
return new GitTagsCommand(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MergeCommand getMergeCommand() {
|
||||
return new GitMergeCommand(context, repository, handler.getWorkdirFactory());
|
||||
return new GitMergeCommand(context, handler.getWorkdirFactory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModifyCommand getModifyCommand() {
|
||||
return new GitModifyCommand(context, repository, handler.getWorkdirFactory(), lfsBlobStoreFactory);
|
||||
return new GitModifyCommand(context, handler.getWorkdirFactory(), lfsBlobStoreFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,9 +284,6 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
/** Field description */
|
||||
private final GitRepositoryHandler handler;
|
||||
|
||||
/** Field description */
|
||||
private final Repository repository;
|
||||
|
||||
private final LfsBlobStoreFactory lfsBlobStoreFactory;
|
||||
|
||||
private final HookContextFactory hookContextFactory;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -37,7 +37,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.Tag;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -55,13 +54,12 @@ public class GitTagsCommand extends AbstractGitCommand implements TagsCommand
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
* @param context
|
||||
*
|
||||
* @param context
|
||||
* @param repository
|
||||
*/
|
||||
public GitTagsCommand(GitContext context, Repository repository)
|
||||
public GitTagsCommand(GitContext context)
|
||||
{
|
||||
super(context, repository);
|
||||
super(context);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user