Procházet zdrojové kódy

Improves multiselect support for cherry-pick

main
Eric Amodio před 2 roky
rodič
revize
ff72918fca
1 změnil soubory, kde provedl 9 přidání a 2 odebrání
  1. +9
    -2
      src/views/viewCommands.ts

+ 9
- 2
src/views/viewCommands.ts Zobrazit soubor

@ -245,7 +245,7 @@ export class ViewCommands {
this,
);
this.registerCommand('gitlens.views.cherryPick', this.cherryPick, this);
this.registerCommand('gitlens.views.cherryPick', this.cherryPick, this, ViewCommandMultiSelectMode.Custom);
this.registerCommand('gitlens.views.createBranch', this.createBranch, this);
this.registerCommand('gitlens.views.deleteBranch', this.deleteBranch, this);
this.registerCommand('gitlens.views.renameBranch', this.renameBranch, this);
@ -326,9 +326,16 @@ export class ViewCommands {
}
@debug()
private cherryPick(node: CommitNode) {
private cherryPick(node: CommitNode, nodes?: CommitNode[]) {
if (!(node instanceof CommitNode)) return Promise.resolve();
if (nodes != null && nodes.length !== 0) {
return GitActions.cherryPick(
node.repoPath,
nodes.map(n => n.ref),
);
}
return GitActions.cherryPick(node.repoPath, node.ref);
}

Načítá se…
Zrušit
Uložit