1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

Show loader when rebasing (#2851)

This commit is contained in:
Jesse Duffield
2023-08-01 09:58:11 +10:00
committed by GitHub

View File

@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
"github.com/jesseduffield/lazygit/pkg/gui/types"
@ -224,6 +225,7 @@ func (self *MergeAndRebaseHelper) RebaseOntoRef(ref string) error {
Key: 's',
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.RebaseBranch)
return self.c.WithWaitingStatus(self.c.Tr.RebasingStatus, func(task gocui.Task) error {
baseCommit := self.c.Modes().MarkedBaseCommit.GetSha()
var err error
if baseCommit != "" {
@ -236,6 +238,7 @@ func (self *MergeAndRebaseHelper) RebaseOntoRef(ref string) error {
self.c.Modes().MarkedBaseCommit.Reset()
}
return err
})
},
},
{