Explorar el Código

Improves multiselect support for cherry-pick

main
Eric Amodio hace 2 años
padre
commit
ff72918fca
Se han modificado 1 ficheros con 9 adiciones y 2 borrados
  1. +9
    -2
      src/views/viewCommands.ts

+ 9
- 2
src/views/viewCommands.ts Ver fichero

@ -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);
}

Cargando…
Cancelar
Guardar