diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-16 20:38:26 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-18 08:36:19 +1100 |
commit | 682db77401e5c44de1eeeb179afd0114bfe82f72 (patch) | |
tree | 1dbdadd56b6e893550565da86fe37cb0a40be30d /pkg/gui/patch_options_panel.go | |
parent | 6faed08d9de2841788b1eac4077862bc4ae682f1 (diff) |
fix lint errors
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r-- | pkg/gui/patch_options_panel.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index 89bdc1e56..69cf67cc3 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/commands" ) func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error { @@ -26,7 +27,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error }, } - if gui.GitCommand.PatchManager.CanRebase && gui.workingTreeState() == "normal" { + if gui.GitCommand.PatchManager.CanRebase && gui.workingTreeState() == commands.REBASE_MODE_NORMAL { menuItems = append(menuItems, []*menuItem{ { displayString: fmt.Sprintf("remove patch from original commit (%s)", gui.GitCommand.PatchManager.To), @@ -74,7 +75,7 @@ func (gui *Gui) getPatchCommitIndex() int { } func (gui *Gui) validateNormalWorkingTreeState() (bool, error) { - if gui.GitCommand.WorkingTreeState() != "normal" { + if gui.GitCommand.WorkingTreeState() != commands.REBASE_MODE_NORMAL { return false, gui.createErrorPanel(gui.Tr.CantPatchWhileRebasingError) } return true, nil |