@@ -340,22 +340,35 @@ func (self *LocalCommitsController) squashDown(selectedCommits []*models.Commit,
340
340
}
341
341
342
342
func (self * LocalCommitsController ) fixup (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
343
- if self .isRebasing () {
344
- return self .updateTodos (todo .Fixup , "" , selectedCommits )
343
+ f := func (flag string ) error {
344
+ if self .isRebasing () {
345
+ return self .updateTodos (todo .Fixup , flag , selectedCommits )
346
+ }
347
+
348
+ return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
349
+ self .c .LogAction (self .c .Tr .Actions .FixupCommit )
350
+ return self .interactiveRebase (todo .Fixup , flag , startIdx , endIdx )
351
+ })
345
352
}
346
353
347
- self .c .Confirm (types.ConfirmOpts {
354
+ return self .c .Menu (types.CreateMenuOptions {
348
355
Title : self .c .Tr .Fixup ,
349
- Prompt : self .c .Tr .SureFixupThisCommit ,
350
- HandleConfirm : func () error {
351
- return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
352
- self .c .LogAction (self .c .Tr .Actions .FixupCommit )
353
- return self .interactiveRebase (todo .Fixup , "" , startIdx , endIdx )
354
- })
356
+ Prompt : "This squashes the selected commit(s) into the commit below it. You can decide which commit message to keep:" ,
357
+ Items : []* types.MenuItem {
358
+ {
359
+ Label : "Keep the message of the commit below" ,
360
+ OnPress : func () error {
361
+ return f ("" )
362
+ },
363
+ },
364
+ {
365
+ Label : "Keep the message of the first selected commit" ,
366
+ OnPress : func () error {
367
+ return f ("-C" )
368
+ },
369
+ },
355
370
},
356
371
})
357
-
358
- return nil
359
372
}
360
373
361
374
func (self * LocalCommitsController ) reword (commit * models.Commit ) error {
0 commit comments