From 66e840bc3f83903852408ed8db0be0c6153b5487 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 30 Dec 2021 13:35:10 +1100 Subject: more refactoring --- pkg/gui/patch_options_panel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/gui/patch_options_panel.go') diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index 8a57e9244..facaa08db 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -3,7 +3,7 @@ package gui import ( "fmt" - "github.com/jesseduffield/lazygit/pkg/commands" + "github.com/jesseduffield/lazygit/pkg/commands/types/enums" ) func (gui *Gui) handleCreatePatchOptionsMenu() error { @@ -26,7 +26,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error { }, } - if gui.GitCommand.PatchManager.CanRebase && gui.GitCommand.WorkingTreeState() == commands.REBASE_MODE_NONE { + if gui.GitCommand.PatchManager.CanRebase && gui.GitCommand.WorkingTreeState() == enums.REBASE_MODE_NONE { menuItems = append(menuItems, []*menuItem{ { displayString: fmt.Sprintf("remove patch from original commit (%s)", gui.GitCommand.PatchManager.To), @@ -74,7 +74,7 @@ func (gui *Gui) getPatchCommitIndex() int { } func (gui *Gui) validateNormalWorkingTreeState() (bool, error) { - if gui.GitCommand.WorkingTreeState() != commands.REBASE_MODE_NONE { + if gui.GitCommand.WorkingTreeState() != enums.REBASE_MODE_NONE { return false, gui.createErrorPanel(gui.Tr.CantPatchWhileRebasingError) } return true, nil -- cgit v1.2.3