Avoids remote disambiguation quick pick

This commit is contained in:
Eric Amodio
2017-09-04 01:37:30 -04:00
parent 5a42ce4ed4
commit 6d759daaad
4 changed files with 17 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import { OpenInRemoteCommandArgs } from './openInRemote';
export interface OpenBranchInRemoteCommandArgs {
branch?: string;
remote?: string;
}
export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
@@ -21,7 +22,9 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
protected async preExecute(context: CommandContext, args: OpenBranchInRemoteCommandArgs = {}): Promise<any> {
if (isCommandViewContextWithBranch(context)) {
args = { ...args };
args.branch = context.node.branch.name;
args.remote = context.node.branch.getRemote();
return this.execute(context.editor, context.uri, args);
}
@@ -57,6 +60,7 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
type: 'branch',
branch: args.branch
},
remote: args.remote,
remotes
} as OpenInRemoteCommandArgs);
}