1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

Simplify the RebaseMode enum

- Remove REBASE_MODE_NORMAL. It is not the "normal" mode anyway, rather a legacy
mode; we have removed support for it in eb0f7e3d02, so there's no point in
representing it in the enum.
- Remove distinction between REBASE_MODE_REBASING and REBASE_MODE_INTERACTIVE;
these are the same now.
- Rename StatusCommands.IsInInteractiveRebase to IsInRebase.
- Remove StatusCommands.RebaseMode; use StatusCommands.IsInRebase instead.
This commit is contained in:
Stefan Haller
2024-06-10 16:52:02 +02:00
parent 37f835244d
commit 1a73697546
4 changed files with 11 additions and 30 deletions

View File

@@ -77,7 +77,7 @@ func (self *CherryPickHelper) Paste() error {
"numCommits": strconv.Itoa(len(self.getData().CherryPickedCommits)),
}),
HandleConfirm: func() error {
isInRebase, err := self.c.Git().Status.IsInInteractiveRebase()
isInRebase, err := self.c.Git().Status.IsInRebase()
if err != nil {
return err
}
@@ -107,7 +107,7 @@ func (self *CherryPickHelper) Paste() error {
// be because there were conflicts. Don't clear the copied
// commits in this case, since we might want to abort and
// try pasting them again.
isInRebase, err = self.c.Git().Status.IsInInteractiveRebase()
isInRebase, err = self.c.Git().Status.IsInRebase()
if err != nil {
return err
}