From 4e30a4e05175fc065a9224da829b61e874b1dea4 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 13 Feb 2012 16:53:33 +0400 Subject: [PATCH] Remove GitGcAction. It is not needed, because git gc is run automatically on several commands such as merge. --- plugins/git4idea/src/META-INF/plugin.xml | 1 - .../src/git4idea/actions/GitGcAction.java | 61 ------------------- 2 files changed, 62 deletions(-) delete mode 100644 plugins/git4idea/src/git4idea/actions/GitGcAction.java diff --git a/plugins/git4idea/src/META-INF/plugin.xml b/plugins/git4idea/src/META-INF/plugin.xml index 732ef0e79d7f..9c1b39e21b20 100644 --- a/plugins/git4idea/src/META-INF/plugin.xml +++ b/plugins/git4idea/src/META-INF/plugin.xml @@ -54,7 +54,6 @@ - diff --git a/plugins/git4idea/src/git4idea/actions/GitGcAction.java b/plugins/git4idea/src/git4idea/actions/GitGcAction.java deleted file mode 100644 index e1e45d347a22..000000000000 --- a/plugins/git4idea/src/git4idea/actions/GitGcAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2000-2011 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package git4idea.actions; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.VcsException; -import com.intellij.openapi.vfs.VirtualFile; -import git4idea.commands.GitCommand; -import git4idea.commands.GitSimpleHandler; -import git4idea.commands.GitTask; -import git4idea.commands.GitTaskResultHandlerAdapter; -import git4idea.i18n.GitBundle; -import org.jetbrains.annotations.NotNull; - -import java.util.List; -import java.util.Set; - -/** - * @author Konstantin Bulenkov - */ -public class GitGcAction extends GitRepositoryAction { - @NotNull - @Override - protected String getActionName() { - return GitBundle.getString("gc.action.name"); - } - - @Override - protected void perform(@NotNull final Project project, - @NotNull List gitRoots, - @NotNull VirtualFile defaultRoot, - Set affectedRoots, - List exceptions) throws VcsException { - for (final VirtualFile root : gitRoots) { - final GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.GC); - final GitTask task = new GitTask(project, handler, getActionName()); - task.executeAsync(new GitTaskResultHandlerAdapter() { - @Override - protected void onSuccess() { - } - - @Override - protected void onFailure() { - } - }); - } - } -}