@@ -4,10 +4,12 @@ import type { GitLog } from '../../git/models/log';
44import type { GitReference } from '../../git/models/reference' ;
55import { createRevisionRange , getReferenceLabel , isRevisionReference } from '../../git/models/reference' ;
66import type { Repository } from '../../git/models/repository' ;
7+ import { showGenericErrorMessage } from '../../messages' ;
78import type { DirectiveQuickPickItem } from '../../quickpicks/items/directive' ;
89import { createDirectiveQuickPickItem , Directive } from '../../quickpicks/items/directive' ;
910import type { FlagsQuickPickItem } from '../../quickpicks/items/flags' ;
1011import { createFlagsQuickPickItem } from '../../quickpicks/items/flags' ;
12+ import { Logger } from '../../system/logger' ;
1113import { pluralize } from '../../system/string' ;
1214import { getEditorCommand } from '../../system/vscode/utils' ;
1315import type { ViewsWithRepositoryFolders } from '../../views/viewBase' ;
@@ -79,15 +81,18 @@ export class RebaseGitCommand extends QuickCommand<State> {
7981 }
8082
8183 async execute ( state : RebaseStepState ) {
82- let configs : string [ ] | undefined ;
84+ const configs : { sequenceEditor ?: string } = { } ;
8385 if ( state . flags . includes ( '--interactive' ) ) {
8486 await this . container . rebaseEditor . enableForNextUse ( ) ;
85-
86- const editor = getEditorCommand ( ) ;
87- configs = [ '-c' , `"sequence.editor=${ editor } "` ] ;
87+ configs . sequenceEditor = getEditorCommand ( ) ;
8888 }
8989
90- state . repo . rebase ( configs , ...state . flags , state . destination . ref ) ;
90+ try {
91+ await state . repo . git . rebase ( state . destination . ref , configs , state . flags ) ;
92+ } catch ( ex ) {
93+ Logger . error ( ex , this . title ) ;
94+ void showGenericErrorMessage ( ex ) ;
95+ }
9196 }
9297
9398 protected async * steps ( state : PartialStepState < State > ) : StepGenerator {
0 commit comments