From 5b3d47b0bb81efb803bdff529d252cf8c5dd8f17 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 27 Sep 2017 17:19:54 +0200 Subject: [PATCH] fixes #35044 --- extensions/git/src/commands.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 54972d64e31..e729856df73 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -92,11 +92,13 @@ class MergeItem implements QuickPickItem { class CreateBranchItem implements QuickPickItem { + constructor(private cc: CommandCenter) { } + get label(): string { return localize('create branch', '$(plus) Create new branch'); } get description(): string { return ''; } async run(repository: Repository): Promise { - await commands.executeCommand('git.branch'); + await this.cc.branch(repository); } } @@ -935,7 +937,7 @@ export class CommandCenter { const includeTags = checkoutType === 'all' || checkoutType === 'tags'; const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; - const createBranch = new CreateBranchItem(); + const createBranch = new CreateBranchItem(this); const heads = repository.refs.filter(ref => ref.type === RefType.Head) .map(ref => new CheckoutItem(ref)); -- GitLab