diff --git a/src/commands/quick/cherry-pick.ts b/src/commands/quick/cherry-pick.ts index 9126634..6fae621 100644 --- a/src/commands/quick/cherry-pick.ts +++ b/src/commands/quick/cherry-pick.ts @@ -18,13 +18,13 @@ interface State { export class CherryPickQuickCommand extends GitCommandBase { constructor() { - super('cherry-pick', 'Cherry Pick'); + super('cherry-pick', 'Cherry Pick', { description: 'via Terminal' }); } execute(state: State) { // Ensure the commits are ordered with the oldest first state.commits.sort((a, b) => a.date.getTime() - b.date.getTime()); - runGitCommandInTerminal('cherry-pick', state.commits.map(c => c.sha).join(' '), state.repo.path); + runGitCommandInTerminal('cherry-pick', state.commits.map(c => c.sha).join(' '), state.repo.path, true); } async *steps(): AsyncIterableIterator { diff --git a/src/commands/quick/merge.ts b/src/commands/quick/merge.ts index cb67cbe..3e83e7d 100644 --- a/src/commands/quick/merge.ts +++ b/src/commands/quick/merge.ts @@ -18,11 +18,11 @@ interface State { export class MergeQuickCommand extends GitCommandBase { constructor() { - super('merge', 'Merge'); + super('merge', 'Merge', { description: 'via Terminal' }); } execute(state: State) { - runGitCommandInTerminal('merge', [...state.flags, state.source.ref].join(' '), state.repo.path); + runGitCommandInTerminal('merge', [...state.flags, state.source.ref].join(' '), state.repo.path, true); } async *steps(): AsyncIterableIterator { diff --git a/src/commands/quick/rebase.ts b/src/commands/quick/rebase.ts index 0db0894..c1e427d 100644 --- a/src/commands/quick/rebase.ts +++ b/src/commands/quick/rebase.ts @@ -18,11 +18,11 @@ interface State { export class RebaseQuickCommand extends GitCommandBase { constructor() { - super('rebase', 'Rebase'); + super('rebase', 'Rebase', { description: 'via Terminal' }); } execute(state: State) { - runGitCommandInTerminal('rebase', [...state.flags, state.source.ref].join(' '), state.repo.path); + runGitCommandInTerminal('rebase', [...state.flags, state.source.ref].join(' '), state.repo.path, true); } async *steps(): AsyncIterableIterator { diff --git a/src/terminal.ts b/src/terminal.ts index c6893d8..a521bc5 100644 --- a/src/terminal.ts +++ b/src/terminal.ts @@ -30,7 +30,7 @@ function ensureTerminal(cwd: string): Terminal { return _terminal; } -export function runGitCommandInTerminal(command: string, args: string, cwd: string) { +export function runGitCommandInTerminal(command: string, args: string, cwd: string, execute: boolean = false) { // let git = GitService.getGitPath(); // if (git.includes(' ')) { // git = `"${git}"`; @@ -38,5 +38,5 @@ export function runGitCommandInTerminal(command: string, args: string, cwd: stri const terminal = ensureTerminal(cwd); terminal.show(false); - terminal.sendText(`git ${command} ${args}`, false); + terminal.sendText(`git ${command} ${args}`, execute); }