Remove GitGcAction. It is not needed, because git gc is run automatically on several commands such as merge.

This commit is contained in:
Kirill Likhodedov
2012-02-13 17:10:19 +04:00
parent 66cfe413b0
commit 4e30a4e051
2 changed files with 0 additions and 62 deletions
-1
View File
@@ -54,7 +54,6 @@
<action id="Git.Rebase.Abort" class="git4idea.actions.GitRebaseAbort" text="Abort Rebasing"/>
<action id="Git.Rebase.Continue" class="git4idea.actions.GitRebaseContinue" text="Continue Rebasing"/>
<action id="Git.Rebase.Skip" class="git4idea.actions.GitRebaseSkip" text="Skip Commit in Rebasing"/>
<action id="Git.Gc" class="git4idea.actions.GitGcAction" text="Run Garbage Collector"/>
<separator/>
</group>
@@ -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<VirtualFile> gitRoots,
@NotNull VirtualFile defaultRoot,
Set<VirtualFile> affectedRoots,
List<VcsException> 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() {
}
});
}
}
}