mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-22 17:26:10 -05:00
Reworks commanding structure for less redundancy
Adds command args copying when needed
This commit is contained in:
@@ -18,7 +18,7 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
||||
super(Commands.OpenBranchInRemote);
|
||||
}
|
||||
|
||||
async execute(editor: TextEditor, uri?: Uri, args: OpenBranchInRemoteCommandArgs = {}) {
|
||||
async execute(editor?: TextEditor, uri?: Uri, args: OpenBranchInRemoteCommandArgs = {}) {
|
||||
uri = getCommandUri(uri, editor);
|
||||
|
||||
const gitUri = uri && await GitUri.fromUri(uri, this.git);
|
||||
@@ -28,6 +28,8 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
||||
|
||||
try {
|
||||
if (args.branch === undefined) {
|
||||
args = { ...args };
|
||||
|
||||
const branches = await this.git.getBranches(repoPath);
|
||||
|
||||
const pick = await BranchesQuickPick.show(branches, `Show history for branch${GlyphChars.Ellipsis}`);
|
||||
|
||||
Reference in New Issue
Block a user