@@ -332,22 +332,35 @@ func (self *LocalCommitsController) squashDown(selectedCommits []*models.Commit,
332332}
333333
334334func (self * LocalCommitsController ) fixup (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
335- if self .isRebasing () {
336- return self .updateTodos (todo .Fixup , "" , selectedCommits )
335+ f := func (flag string ) error {
336+ if self .isRebasing () {
337+ return self .updateTodos (todo .Fixup , flag , selectedCommits )
338+ }
339+
340+ return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
341+ self .c .LogAction (self .c .Tr .Actions .FixupCommit )
342+ return self .interactiveRebase (todo .Fixup , flag , startIdx , endIdx )
343+ })
337344 }
338345
339- self .c .Confirm (types.ConfirmOpts {
346+ return self .c .Menu (types.CreateMenuOptions {
340347 Title : self .c .Tr .Fixup ,
341- Prompt : self .c .Tr .SureFixupThisCommit ,
342- HandleConfirm : func () error {
343- return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
344- self .c .LogAction (self .c .Tr .Actions .FixupCommit )
345- return self .interactiveRebase (todo .Fixup , "" , startIdx , endIdx )
346- })
348+ Prompt : "This squashes the selected commit(s) into the commit below it. You can decide which commit message to keep:" ,
349+ Items : []* types.MenuItem {
350+ {
351+ Label : "Keep the message of the commit below" ,
352+ OnPress : func () error {
353+ return f ("" )
354+ },
355+ },
356+ {
357+ Label : "Keep the message of the first selected commit" ,
358+ OnPress : func () error {
359+ return f ("-C" )
360+ },
361+ },
347362 },
348363 })
349-
350- return nil
351364}
352365
353366func (self * LocalCommitsController ) reword (commit * models.Commit ) error {
0 commit comments