@@ -324,22 +324,35 @@ func (self *LocalCommitsController) squashDown(selectedCommits []*models.Commit,
324324}
325325
326326func (self * LocalCommitsController ) fixup (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
327- if self .isRebasing () {
328- return self .updateTodos (todo .Fixup , "" , selectedCommits )
327+ f := func (flag string ) error {
328+ if self .isRebasing () {
329+ return self .updateTodos (todo .Fixup , flag , selectedCommits )
330+ }
331+
332+ return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
333+ self .c .LogAction (self .c .Tr .Actions .FixupCommit )
334+ return self .interactiveRebase (todo .Fixup , flag , startIdx , endIdx )
335+ })
329336 }
330337
331- self .c .Confirm (types.ConfirmOpts {
338+ return self .c .Menu (types.CreateMenuOptions {
332339 Title : self .c .Tr .Fixup ,
333- Prompt : self .c .Tr .SureFixupThisCommit ,
334- HandleConfirm : func () error {
335- return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
336- self .c .LogAction (self .c .Tr .Actions .FixupCommit )
337- return self .interactiveRebase (todo .Fixup , "" , startIdx , endIdx )
338- })
340+ Prompt : "This squashes the selected commit(s) into the commit below it. You can decide which commit message to keep:" ,
341+ Items : []* types.MenuItem {
342+ {
343+ Label : "Keep the message of the commit below" ,
344+ OnPress : func () error {
345+ return f ("" )
346+ },
347+ },
348+ {
349+ Label : "Keep the message of the first selected commit" ,
350+ OnPress : func () error {
351+ return f ("-C" )
352+ },
353+ },
339354 },
340355 })
341-
342- return nil
343356}
344357
345358func (self * LocalCommitsController ) reword (commit * models.Commit ) error {
0 commit comments