diff options
Diffstat (limited to 'pkg/gui/rebase_options_panel.go')
-rw-r--r-- | pkg/gui/rebase_options_panel.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/rebase_options_panel.go b/pkg/gui/rebase_options_panel.go index 514cdf5ae..6cc9f113b 100644 --- a/pkg/gui/rebase_options_panel.go +++ b/pkg/gui/rebase_options_panel.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/jesseduffield/lazygit/pkg/commands" + "github.com/jesseduffield/lazygit/pkg/commands/types/enums" ) type RebaseOption string @@ -18,7 +18,7 @@ const ( func (gui *Gui) handleCreateRebaseOptionsMenu() error { options := []string{REBASE_OPTION_CONTINUE, REBASE_OPTION_ABORT} - if gui.GitCommand.WorkingTreeState() == commands.REBASE_MODE_REBASING { + if gui.GitCommand.WorkingTreeState() == enums.REBASE_MODE_REBASING { options = append(options, REBASE_OPTION_SKIP) } @@ -35,7 +35,7 @@ func (gui *Gui) handleCreateRebaseOptionsMenu() error { } var title string - if gui.GitCommand.WorkingTreeState() == commands.REBASE_MODE_MERGING { + if gui.GitCommand.WorkingTreeState() == enums.REBASE_MODE_MERGING { title = gui.Tr.MergeOptionsTitle } else { title = gui.Tr.RebaseOptionsTitle @@ -47,7 +47,7 @@ func (gui *Gui) handleCreateRebaseOptionsMenu() error { func (gui *Gui) genericMergeCommand(command string) error { status := gui.GitCommand.WorkingTreeState() - if status != commands.REBASE_MODE_MERGING && status != commands.REBASE_MODE_REBASING { + if status != enums.REBASE_MODE_MERGING && status != enums.REBASE_MODE_REBASING { return gui.createErrorPanel(gui.Tr.NotMergingOrRebasing) } @@ -55,16 +55,16 @@ func (gui *Gui) genericMergeCommand(command string) error { commandType := "" switch status { - case commands.REBASE_MODE_MERGING: + case enums.REBASE_MODE_MERGING: commandType = "merge" - case commands.REBASE_MODE_REBASING: + case enums.REBASE_MODE_REBASING: commandType = "rebase" } // we should end up with a command like 'git merge --continue' // it's impossible for a rebase to require a commit so we'll use a subprocess only if it's a merge - if status == commands.REBASE_MODE_MERGING && command != REBASE_OPTION_ABORT && gui.UserConfig.Git.Merging.ManualCommit { + if status == enums.REBASE_MODE_MERGING && command != REBASE_OPTION_ABORT && gui.UserConfig.Git.Merging.ManualCommit { sub := gitCommand.Cmd.New("git " + commandType + " --" + command) if sub != nil { return gui.runSubprocessWithSuspenseAndRefresh(sub) @@ -144,9 +144,9 @@ func (gui *Gui) abortMergeOrRebaseWithConfirm() error { func (gui *Gui) workingTreeStateNoun() string { workingTreeState := gui.GitCommand.WorkingTreeState() switch workingTreeState { - case commands.REBASE_MODE_NONE: + case enums.REBASE_MODE_NONE: return "" - case commands.REBASE_MODE_MERGING: + case enums.REBASE_MODE_MERGING: return "merge" default: return "rebase" |