提交 689d4766 编写于 作者: J João Moreno 提交者: GitHub

Merge pull request #21317 from ivanz/iz-git-pull-rebase-action

Added "Git: Pull (Rebase)" to workspace actions.
......@@ -32,7 +32,8 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import {
OpenChangeAction, OpenFileAction, SyncAction, PullAction, PushAction,
PushToRemoteAction, PublishAction, StartGitBranchAction, StartGitCheckoutAction,
InputCommitAction, UndoLastCommitAction, BaseStageAction, BaseUnstageAction
InputCommitAction, UndoLastCommitAction, BaseStageAction, BaseUnstageAction,
PullWithRebaseAction
} from './gitActions';
import paths = require('vs/base/common/paths');
import URI from 'vs/base/common/uri';
......@@ -725,6 +726,7 @@ if (!SCMPreview.enabled) {
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalOpenChangeAction, GlobalOpenChangeAction.ID, GlobalOpenChangeAction.LABEL), 'Git: Open Change', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalOpenInEditorAction, GlobalOpenInEditorAction.ID, GlobalOpenInEditorAction.LABEL), 'Git: Open File', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PullAction, PullAction.ID, PullAction.LABEL), 'Git: Pull', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PullWithRebaseAction, PullWithRebaseAction.ID, PullWithRebaseAction.LABEL), 'Git: Pull (Rebase)', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PushAction, PushAction.ID, PushAction.LABEL), 'Git: Push', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PushToRemoteAction, PushToRemoteAction.ID, PushToRemoteAction.LABEL), 'Git: Push to...', category);
workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SyncAction, SyncAction.ID, SyncAction.LABEL), 'Git: Sync', category);
......
......@@ -959,8 +959,12 @@ export class PullWithRebaseAction extends PullAction {
static ID = 'workbench.action.git.pull.rebase';
static LABEL = 'Pull (Rebase)';
constructor( @IGitService gitService: IGitService) {
super(PullWithRebaseAction.ID, PullWithRebaseAction.LABEL, gitService);
constructor(
id = PullWithRebaseAction.ID,
label = PullWithRebaseAction.LABEL,
@IGitService gitService: IGitService
) {
super(id, label, gitService);
}
public run(context?: any): Promise {
......
......@@ -281,7 +281,7 @@ export class ChangesView extends EventEmitter.EventEmitter implements GitView.IV
this.secondaryActions = [
this.instantiationService.createInstance(GitActions.SyncAction, GitActions.SyncAction.ID, GitActions.SyncAction.LABEL),
this.instantiationService.createInstance(GitActions.PullAction, GitActions.PullAction.ID, GitActions.PullAction.LABEL),
this.instantiationService.createInstance(GitActions.PullWithRebaseAction),
this.instantiationService.createInstance(GitActions.PullWithRebaseAction, GitActions.PullWithRebaseAction.ID, GitActions.PullWithRebaseAction.LABEL),
this.instantiationService.createInstance(GitActions.PushAction, GitActions.PushAction.ID, GitActions.PushAction.LABEL),
this.instantiationService.createInstance(GitActions.PushToRemoteAction, GitActions.PushToRemoteAction.ID, GitActions.PushToRemoteAction.LABEL),
new ActionBar.Separator(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册