diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/branches_panel.go | 6 | ||||
-rw-r--r-- | pkg/gui/commit_files_panel.go | 4 | ||||
-rw-r--r-- | pkg/gui/controllers/files_controller.go | 18 | ||||
-rw-r--r-- | pkg/gui/controllers/local_commits_controller.go | 18 | ||||
-rw-r--r-- | pkg/gui/controllers/tags_controller.go | 18 | ||||
-rw-r--r-- | pkg/gui/controllers/tags_helper.go (renamed from pkg/gui/controllers/tag_actions.go) | 16 | ||||
-rw-r--r-- | pkg/gui/controllers/types.go | 2 | ||||
-rw-r--r-- | pkg/gui/controllers/undo_controller.go | 12 | ||||
-rw-r--r-- | pkg/gui/file_helper.go | 16 | ||||
-rw-r--r-- | pkg/gui/gui.go | 26 | ||||
-rw-r--r-- | pkg/gui/line_by_line_panel.go | 2 | ||||
-rw-r--r-- | pkg/gui/ref_helper.go | 16 | ||||
-rw-r--r-- | pkg/gui/reflog_panel.go | 4 | ||||
-rw-r--r-- | pkg/gui/remote_branches_panel.go | 2 | ||||
-rw-r--r-- | pkg/gui/status_panel.go | 4 | ||||
-rw-r--r-- | pkg/gui/sub_commits_panel.go | 4 |
16 files changed, 84 insertions, 84 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 59160bc0f..2a5d0f308 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -58,7 +58,7 @@ func (gui *Gui) handleBranchPress() error { } branch := gui.getSelectedBranch() gui.c.LogAction(gui.c.Tr.Actions.CheckoutBranch) - return gui.refHelper.CheckoutRef(branch.Name, types.CheckoutRefOptions{}) + return gui.refsHelper.CheckoutRef(branch.Name, types.CheckoutRefOptions{}) } func (gui *Gui) handleCreatePullRequestPress() error { @@ -134,7 +134,7 @@ func (gui *Gui) handleCheckoutByName() error { FindSuggestionsFunc: gui.suggestionsHelper.GetRefsSuggestionsFunc(), HandleConfirm: func(response string) error { gui.c.LogAction("Checkout branch") - return gui.refHelper.CheckoutRef(response, types.CheckoutRefOptions{ + return gui.refsHelper.CheckoutRef(response, types.CheckoutRefOptions{ OnRefNotFound: func(ref string) error { return gui.c.Ask(types.AskOpts{ Title: gui.c.Tr.BranchNotFoundTitle, @@ -328,7 +328,7 @@ func (gui *Gui) handleCreateResetToBranchMenu() error { return nil } - return gui.refHelper.CreateGitResetMenu(branch.Name) + return gui.refsHelper.CreateGitResetMenu(branch.Name) } func (gui *Gui) handleRenameBranch() error { diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go index aefea5647..55090010c 100644 --- a/pkg/gui/commit_files_panel.go +++ b/pkg/gui/commit_files_panel.go @@ -126,7 +126,7 @@ func (gui *Gui) handleOpenOldCommitFile() error { return nil } - return gui.fileHelper.OpenFile(node.GetPath()) + return gui.filesHelper.OpenFile(node.GetPath()) } func (gui *Gui) handleEditCommitFile() error { @@ -139,7 +139,7 @@ func (gui *Gui) handleEditCommitFile() error { return gui.c.ErrorMsg(gui.c.Tr.ErrCannotEditDirectory) } - return gui.fileHelper.EditFile(node.GetPath()) + return gui.filesHelper.EditFile(node.GetPath()) } func (gui *Gui) handleToggleFileForPatch() error { diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index e2626078d..8ce768ac6 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -39,8 +39,8 @@ type FilesController struct { getSelectedPath func() string switchToMergeFn func(path string) error suggestionsHelper ISuggestionsHelper - refHelper IRefHelper - fileHelper IFileHelper + refsHelper IRefsHelper + filesHelper IFileHelper workingTreeHelper IWorkingTreeHelper } @@ -63,8 +63,8 @@ func NewFilesController( getSelectedPath func() string, switchToMergeFn func(path string) error, suggestionsHelper ISuggestionsHelper, - refHelper IRefHelper, - fileHelper IFileHelper, + refsHelper IRefsHelper, + filesHelper IFileHelper, workingTreeHelper IWorkingTreeHelper, ) *FilesController { return &FilesController{ @@ -84,8 +84,8 @@ func NewFilesController( getSelectedPath: getSelectedPath, switchToMergeFn: switchToMergeFn, suggestionsHelper: suggestionsHelper, - refHelper: refHelper, - fileHelper: fileHelper, + refsHelper: refsHelper, + filesHelper: filesHelper, workingTreeHelper: workingTreeHelper, } } @@ -554,7 +554,7 @@ func (self *FilesController) edit(node *filetree.FileNode) error { return self.c.ErrorMsg(self.c.Tr.ErrCannotEditDirectory) } - return self.fileHelper.EditFile(node.GetPath()) + return self.filesHelper.EditFile(node.GetPath()) } func (self *FilesController) Open() error { @@ -563,7 +563,7 @@ func (self *FilesController) Open() error { return nil } - return self.fileHelper.OpenFile(node.GetPath()) + return self.filesHelper.OpenFile(node.GetPath()) } func (self *FilesController) switchToMerge() error { @@ -627,7 +627,7 @@ func (self *FilesController) stash() error { } func (self *FilesController) createResetMenu() error { - return self.refHelper.CreateGitResetMenu("@{upstream}") + return self.refsHelper.CreateGitResetMenu("@{upstream}") } func (self *FilesController) handleToggleDirCollapsed() error { diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 3222a37e3..8b4cddfaf 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -28,8 +28,8 @@ type LocalCommitsController struct { getContext func() types.IListContext os *oscommands.OSCommand git *commands.GitCommand - tagActions *TagActions - refHelper IRefHelper + tagsHelper *TagsHelper + refsHelper IRefsHelper getSelectedLocalCommit func() *models.Commit getCommits func() []*models.Commit @@ -52,8 +52,8 @@ func NewLocalCommitsController( getContext func() types.IListContext, os *oscommands.OSCommand, git *commands.GitCommand, - tagActions *TagActions, - refHelper IRefHelper, + tagsHelper *TagsHelper, + refsHelper IRefsHelper, getSelectedLocalCommit func() *models.Commit, getCommits func() []*models.Commit, getSelectedLocalCommitIdx func() int, @@ -72,8 +72,8 @@ func NewLocalCommitsController( getContext: getContext, os: os, git: git, - tagActions: tagActions, - refHelper: refHelper, + tagsHelper: tagsHelper, + refsHelper: refsHelper, getSelectedLocalCommit: getSelectedLocalCommit, getCommits: getCommits, getSelectedLocalCommitIdx: getSelectedLocalCommitIdx, @@ -606,7 +606,7 @@ func (self *LocalCommitsController) handleSquashAllAboveFixupCommits(commit *mod } func (self *LocalCommitsController) handleTagCommit(commit *models.Commit) error { - return self.tagActions.CreateTagMenu(commit.Sha, func() {}) + return self.tagsHelper.CreateTagMenu(commit.Sha, func() {}) } func (self *LocalCommitsController) handleCheckoutCommit(commit *models.Commit) error { @@ -615,13 +615,13 @@ func (self *LocalCommitsController) handleCheckoutCommit(commit *models.Commit) Prompt: self.c.Tr.SureCheckoutThisCommit, HandleConfirm: func() error { self.c.LogAction(self.c.Tr.Actions.CheckoutCommit) - return self.refHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) + return self.refsHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) }, }) } func (self *LocalCommitsController) handleCreateCommitResetMenu(commit *models.Commit) error { - return self.refHelper.CreateGitResetMenu(commit.Sha) + return self.refsHelper.CreateGitResetMenu(commit.Sha) } func (self *LocalCommitsController) handleOpenSearch(string) error { diff --git a/pkg/gui/controllers/tags_controller.go b/pkg/gui/controllers/tags_controller.go index 1ba03451c..0ba73857e 100644 --- a/pkg/gui/controllers/tags_controller.go +++ b/pkg/gui/controllers/tags_controller.go @@ -14,9 +14,9 @@ type TagsController struct { getContext func() *context.TagsContext git *commands.GitCommand getContexts func() context.ContextTree - tagActions *TagActions + tagsHelper *TagsHelper - refHelper IRefHelper + refsHelper IRefsHelper suggestionsHelper ISuggestionsHelper switchToSubCommitsContext func(string) error @@ -29,8 +29,8 @@ func NewTagsController( getContext func() *context.TagsContext, git *commands.GitCommand, getContexts func() context.ContextTree, - tagActions *TagActions, - refHelper IRefHelper, + tagsHelper *TagsHelper, + refsHelper IRefsHelper, suggestionsHelper ISuggestionsHelper, switchToSubCommitsContext func(string) error, @@ -40,8 +40,8 @@ func NewTagsController( getContext: getContext, git: git, getContexts: getContexts, - tagActions: tagActions, - refHelper: refHelper, + tagsHelper: tagsHelper, + refsHelper: refsHelper, suggestionsHelper: suggestionsHelper, switchToSubCommitsContext: switchToSubCommitsContext, @@ -88,7 +88,7 @@ func (self *TagsController) Keybindings(getKey func(key string) interface{}, con func (self *TagsController) checkout(tag *models.Tag) error { self.c.LogAction(self.c.Tr.Actions.CheckoutTag) - if err := self.refHelper.CheckoutRef(tag.Name, types.CheckoutRefOptions{}); err != nil { + if err := self.refsHelper.CheckoutRef(tag.Name, types.CheckoutRefOptions{}); err != nil { return err } return self.c.PushContext(self.getContexts().Branches) @@ -146,12 +146,12 @@ func (self *TagsController) push(tag *models.Tag) error { } func (self *TagsController) createResetMenu(tag *models.Tag) error { - return self.refHelper.CreateGitResetMenu(tag.Name) + return self.refsHelper.CreateGitResetMenu(tag.Name) } func (self *TagsController) create() error { // leaving commit SHA blank so that we're just creating the tag for the current commit - return self.tagActions.CreateTagMenu("", func() { self.getContext().GetPanelState().SetSelectedLineIdx(0) }) + return self.tagsHelper.CreateTagMenu("", func() { self.getContext().GetPanelState().SetSelectedLineIdx(0) }) } func (self *TagsController) withSelectedTag(f func(tag *models.Tag) error) func() error { diff --git a/pkg/gui/controllers/tag_actions.go b/pkg/gui/controllers/tags_helper.go index a48c339ef..6cec4fe4d 100644 --- a/pkg/gui/controllers/tag_actions.go +++ b/pkg/gui/controllers/tags_helper.go @@ -5,23 +5,23 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -// Actions structs are for defining functionality that could be used by multiple contexts. +// Helper structs are for defining functionality that could be used by multiple contexts. // For example, here we have a CreateTagMenu which is applicable to both the tags context // and the commits context. -type TagActions struct { +type TagsHelper struct { c *types.ControllerCommon git *commands.GitCommand } -func NewTagActions(c *types.ControllerCommon, git *commands.GitCommand) *TagActions { - return &TagActions{ +func NewTagsHelper(c *types.ControllerCommon, git *commands.GitCommand) *TagsHelper { + return &TagsHelper{ c: c, git: git, } } -func (self *TagActions) CreateTagMenu(commitSha string, onCreate func()) error { +func (self *TagsHelper) CreateTagMenu(commitSha string, onCreate func()) error { return self.c.Menu(types.CreateMenuOptions{ Title: self.c.Tr.TagMenuTitle, Items: []*types.MenuItem{ @@ -41,14 +41,14 @@ func (self *TagActions) CreateTagMenu(commitSha string, onCreate func()) error { }) } -func (self *TagActions) afterTagCreate(onCreate func()) error { +func (self *TagsHelper) afterTagCreate(onCreate func()) error { onCreate() return self.c.Refresh(types.RefreshOptions{ Mode: types.ASYNC, Scope: []types.RefreshableView{types.COMMITS, types.TAGS}, }) } -func (self *TagActions) handleCreateAnnotatedTag(commitSha string, onCreate func()) error { +func (self *TagsHelper) handleCreateAnnotatedTag(commitSha string, onCreate func()) error { return self.c.Prompt(types.PromptOpts{ Title: self.c.Tr.TagNameTitle, HandleConfirm: func(tagName string) error { @@ -66,7 +66,7 @@ func (self *TagActions) handleCreateAnnotatedTag(commitSha string, onCreate func }) } -func (self *TagActions) handleCreateLightweightTag(commitSha string, onCreate func()) error { +func (self *TagsHelper) handleCreateLightweightTag(commitSha string, onCreate func()) error { return self.c.Prompt(types.PromptOpts{ Title: self.c.Tr.TagNameTitle, HandleConfirm: func(tagName string) error { diff --git a/pkg/gui/controllers/types.go b/pkg/gui/controllers/types.go index 19e3769a5..ec0b71a90 100644 --- a/pkg/gui/controllers/types.go +++ b/pkg/gui/controllers/types.go @@ -5,7 +5,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type IRefHelper interface { +type IRefsHelper interface { CheckoutRef(ref string, options types.CheckoutRefOptions) error CreateGitResetMenu(ref string) error ResetToRef(ref string, strength string, envVars []string) error diff --git a/pkg/gui/controllers/undo_controller.go b/pkg/gui/controllers/undo_controller.go index 571be4251..89bc6ea9e 100644 --- a/pkg/gui/controllers/undo_controller.go +++ b/pkg/gui/controllers/undo_controller.go @@ -23,7 +23,7 @@ type UndoController struct { c *types.ControllerCommon git *commands.GitCommand - refHelper IRefHelper + refsHelper IRefsHelper workingTreeHelper IWorkingTreeHelper getFilteredReflogCommits func() []*models.Commit @@ -34,7 +34,7 @@ var _ types.IController = &UndoController{} func NewUndoController( c *types.ControllerCommon, git *commands.GitCommand, - refHelper IRefHelper, + refsHelper IRefsHelper, workingTreeHelper IWorkingTreeHelper, getFilteredReflogCommits func() []*models.Commit, @@ -42,7 +42,7 @@ func NewUndoController( return &UndoController{ c: c, git: git, - refHelper: refHelper, + refsHelper: refsHelper, workingTreeHelper: workingTreeHelper, getFilteredReflogCommits: getFilteredReflogCommits, @@ -111,7 +111,7 @@ func (self *UndoController) reflogUndo() error { }) case CHECKOUT: self.c.LogAction(self.c.Tr.Actions.Undo) - return true, self.refHelper.CheckoutRef(action.from, types.CheckoutRefOptions{ + return true, self.refsHelper.CheckoutRef(action.from, types.CheckoutRefOptions{ EnvVars: undoEnvVars, WaitingStatus: undoingStatus, }) @@ -149,7 +149,7 @@ func (self *UndoController) reflogRedo() error { }) case CHECKOUT: self.c.LogAction(self.c.Tr.Actions.Redo) - return true, self.refHelper.CheckoutRef(action.to, types.CheckoutRefOptions{ + return true, self.refsHelper.CheckoutRef(action.to, types.CheckoutRefOptions{ EnvVars: redoEnvVars, WaitingStatus: redoingStatus, }) @@ -224,7 +224,7 @@ type hardResetOptions struct { // only to be used in the undo flow for now (does an autostash) func (self *UndoController) hardResetWithAutoStash(commitSha string, options hardResetOptions) error { reset := func() error { - if err := self.refHelper.ResetToRef(commitSha, "hard", options.EnvVars); err != nil { + if err := self.refsHelper.ResetToRef(commitSha, "hard", options.EnvVars); err != nil { return self.c.Error(err) } return nil diff --git a/pkg/gui/file_helper.go b/pkg/gui/file_helper.go index adf0e4dd0..2e32e168f 100644 --- a/pkg/gui/file_helper.go +++ b/pkg/gui/file_helper.go @@ -7,31 +7,31 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type FileHelper struct { +type FilesHelper struct { c *types.ControllerCommon git *commands.GitCommand os *oscommands.OSCommand } -func NewFileHelper( +func NewFilesHelper( c *types.ControllerCommon, git *commands.GitCommand, os *oscommands.OSCommand, -) *FileHelper { - return &FileHelper{ +) *FilesHelper { + return &FilesHelper{ c: c, git: git, os: os, } } -var _ controllers.IFileHelper = &FileHelper{} +var _ controllers.IFileHelper = &FilesHelper{} -func (self *FileHelper) EditFile(filename string) error { +func (self *FilesHelper) EditFile(filename string) error { return self.EditFileAtLine(filename, 1) } -func (self *FileHelper) EditFileAtLine(filename string, lineNumber int) error { +func (self *FilesHelper) EditFileAtLine(filename string, lineNumber int) error { cmdStr, err := self.git.File.GetEditCmdStr(filename, lineNumber) if err != nil { return self.c.Error(err) @@ -43,7 +43,7 @@ func (self *FileHelper) EditFileAtLine(filename string, lineNumber int) error { ) } -func (self *FileHelper) OpenFile(filename string) error { +func (self *FilesHelper) OpenFile(filename string) error { self.c.LogAction(self.c.Tr.Actions.OpenFile) if err := self.os.OpenFile(filename); err != nil { return self.c.Error(err) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 6796d16de..1d9ee2d76 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -144,9 +144,9 @@ type Gui struct { PrevLayout PrevLayout c *types.ControllerCommon - refHelper *RefHelper + refsHelper *RefsHelper suggestionsHelper *SuggestionsHelper - fileHelper *FileHelper + filesHelper *FilesHelper workingTreeHelper *WorkingTreeHelper // this is the initial dir we are in upon opening lazygit. We hold onto this @@ -571,17 +571,17 @@ func (gui *Gui) setControllers() { getState := func() *GuiRepoState { return gui.State } getContexts := func() context.ContextTree { return gui.State.Contexts } // TODO: have a getGit function too - refHelper := NewRefHelper( + refsHelper := NewRefsHelper( controllerCommon, gui.git, getState, ) - gui.refHelper = refHelper + gui.refsHelper = refsHelper gui.suggestionsHelper = NewSuggestionsHelper(controllerCommon, getState, gui.refreshSuggestions) - gui.fileHelper = NewFileHelper(controllerCommon, gui.git, osCommand) + gui.filesHelper = NewFilesHelper(controllerCommon, gui.git, osCommand) gui.workingTreeHelper = NewWorkingTreeHelper(func() *filetree.FileTreeViewModel { return gui.State.FileTreeViewModel }) - tagActions := controllers.NewTagActions(controllerCommon, gui.git) + tagsHelper := controllers.NewTagsHelper(controllerCommon, gui.git) syncController := controllers.NewSyncController( controllerCommon, @@ -617,8 +617,8 @@ func (gui *Gui) setControllers() { gui.getSelectedPath, gui.switchToMerge, gui.suggestionsHelper, - gui.refHelper, - gui.fileHelper, + gui.refsHelper, + gui.filesHelper, gui.workingTreeHelper, ), Tags: controllers.NewTagsController( @@ -626,8 +626,8 @@ func (gui *Gui) setControllers() { func() *context.TagsContext { return gui.State.Contexts.Tags }, gui.git, getContexts, - tagActions, - refHelper, + tagsHelper, + refsHelper, gui.suggestionsHelper, gui.switchToSubCommitsContext, ), @@ -636,8 +636,8 @@ func (gui *Gui) setControllers() { func() types.IListContext { return gui.State.Contexts.BranchCommits }, osCommand, gui.git, - tagActions, - refHelper, + tagsHelper, + refsHelper, gui.getSelectedLocalCommit, func() []*models.Commit { return gui.State.Commits }, func() int { return gui.State.Panels.Commits.SelectedLineIdx }, @@ -674,7 +674,7 @@ func (gui *Gui) setControllers() { Undo: controllers.NewUndoController( controllerCommon, gui.git, - refHelper, + refsHelper, gui.workingTreeHelper, func() []*models.Commit { return gui.State.FilteredReflogCommits }, ), diff --git a/pkg/gui/line_by_line_panel.go b/pkg/gui/line_by_line_panel.go index aec581a14..8d283576f 100644 --- a/pkg/gui/line_by_line_panel.go +++ b/pkg/gui/line_by_line_panel.go @@ -285,5 +285,5 @@ func (gui *Gui) handleLineByLineEdit() error { } lineNumber := gui.State.Panels.LineByLine.CurrentLineNumber() - return gui.fileHelper.EditFileAtLine(file.Name, lineNumber) + return gui.filesHelper.EditFileAtLine(file.Name, lineNumber) } diff --git a/pkg/gui/ref_helper.go b/pkg/gui/ref_helper.go index b5a198bab..1d1e408c2 100644 --- a/pkg/gui/ref_helper.go +++ b/pkg/gui/ref_helper.go @@ -11,28 +11,28 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type RefHelper struct { +type RefsHelper struct { c *types.ControllerCommon git *commands.GitCommand getState func() *GuiRepoState } -func NewRefHelper( +func NewRefsHelper( c *types.ControllerCommon, git *commands.GitCommand, getState func() *GuiRepoState, -) *RefHelper { - return &RefHelper{ +) *RefsHelper { + return &RefsHelper{ c: c, git: git, getState: getState, } } -var _ controllers.IRefHelper = &RefHelper{} +var _ controllers.IRefsHelper = &RefsHelper{} -func (self *RefHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error { +func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error { waitingStatus := options.WaitingStatus if waitingStatus == "" { waitingStatus = self.c.Tr.CheckingOutStatus @@ -91,7 +91,7 @@ func (self *RefHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) }) } -func (self *RefHelper) ResetToRef(ref string, strength string, envVars []string) error { +func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string) error { if err := self.git.Commit.ResetToCommit(ref, strength, envVars); err != nil { return self.c.Error(err) } @@ -112,7 +112,7 @@ func (self *RefHelper) ResetToRef(ref string, strength string, envVars []string) return nil } -func (self *RefHelper) CreateGitResetMenu(ref string) error { +func (self *RefsHelper) CreateGitResetMenu(ref string) error { strengths := []string{"soft", "mixed", "hard"} menuItems := make([]*types.MenuItem, len(strengths)) for i, strength := range strengths { diff --git a/pkg/gui/reflog_panel.go b/pkg/gui/reflog_panel.go index 7f46a2748..4857840d2 100644 --- a/pkg/gui/reflog_panel.go +++ b/pkg/gui/reflog_panel.go @@ -48,7 +48,7 @@ func (gui *Gui) CheckoutReflogCommit() error { Prompt: gui.c.Tr.SureCheckoutThisCommit, HandleConfirm: func() error { gui.c.LogAction(gui.c.Tr.Actions.CheckoutReflogCommit) - return gui.refHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) + return gui.refsHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) }, }) if err != nil { @@ -63,7 +63,7 @@ func (gui *Gui) CheckoutReflogCommit() error { func (gui *Gui) handleCreateReflogResetMenu() error { commit := gui.getSelectedReflogCommit() - return gui.refHelper.CreateGitResetMenu(commit.Sha) + return gui.refsHelper.CreateGitResetMenu(commit.Sha) } func (gui *Gui) handleViewReflogCommitFiles() error { diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go index afbb10705..882dea42e 100644 --- a/pkg/gui/remote_branches_panel.go +++ b/pkg/gui/remote_branches_panel.go @@ -107,5 +107,5 @@ func (gui *Gui) handleCreateResetToRemoteBranchMenu() error { return nil } - return gui.refHelper.CreateGitResetMenu(selectedBranch.FullName()) + return gui.refsHelper.CreateGitResetMenu(selectedBranch.FullName()) } diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index 9ec5ec29a..f79a5e9cd 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -130,11 +130,11 @@ func (gui *Gui) askForConfigFile(action func(file string) error) error { } func (gui *Gui) handleOpenConfig() error { - return gui.askForConfigFile(gui.fileHelper.OpenFile) + return gui.askForConfigFile(gui.filesHelper.OpenFile) } func (gui *Gui) handleEditConfig() error { - return gui.askForConfigFile(gui.fileHelper.EditFile) + return gui.askForConfigFile(gui.filesHelper.EditFile) } func lazygitTitle() string { diff --git a/pkg/gui/sub_commits_panel.go b/pkg/gui/sub_commits_panel.go index 6e392fcc9..0c7b7a0b5 100644 --- a/pkg/gui/sub_commits_panel.go +++ b/pkg/gui/sub_commits_panel.go @@ -49,7 +49,7 @@ func (gui *Gui) handleCheckoutSubCommit() error { Prompt: gui.c.Tr.SureCheckoutThisCommit, HandleConfirm: func() error { gui.c.LogAction(gui.c.Tr.Actions.CheckoutCommit) - return gui.refHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) + return gui.refsHelper.CheckoutRef(commit.Sha, types.CheckoutRefOptions{}) }, }) if err != nil { @@ -64,7 +64,7 @@ func (gui *Gui) handleCheckoutSubCommit() error { func (gui *Gui) handleCreateSubCommitResetMenu() error { commit := gui.getSelectedSubCommit() - return gui.refHelper.CreateGitResetMenu(commit.Sha) + return gui.refsHelper.CreateGitResetMenu(commit.Sha) } func (gui *Gui) handleViewSubCommitFiles() error { |