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

@ -487,7 +487,7 @@ func TestCommitLoader_getConflictedCommitImpl(t *testing.T) {
builder := &CommitLoader{
Common: common,
cmd: oscommands.NewDummyCmdObjBuilder(oscommands.NewFakeRunner(t)),
getWorkingTreeState: func() enums.RebaseMode { return enums.REBASE_MODE_INTERACTIVE },
getWorkingTreeState: func() enums.RebaseMode { return enums.REBASE_MODE_REBASING },
dotGitDir: ".git",
readFile: func(filename string) ([]byte, error) {
return []byte(""), nil