diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 11:05:37 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | fbd61fcd17d495e9605bcf1f765663f861839cac (patch) | |
tree | d5d9eaa12e3e5fbefa5c50282af8f8207d5bb6a3 /pkg/gui/commits_panel.go | |
parent | b1529f19ad527d29a469de09c11c37d7f61d8d16 (diff) |
refactor how we handle different modes
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r-- | pkg/gui/commits_panel.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 6db2d71d6..d74eec550 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -37,7 +37,7 @@ func (gui *Gui) handleCommitSelect() error { task = gui.createRenderStringTask(gui.Tr.SLocalize("NoCommitsThisBranch")) } else { cmd := gui.OSCommand.ExecutableFromString( - gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.FilterPath), + gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.Modes.Filtering.Path), ) task = gui.createRunPtyTask(cmd) } @@ -97,12 +97,12 @@ func (gui *Gui) refreshCommits() error { } func (gui *Gui) refreshCommitsWithLimit() error { - builder := commands.NewCommitListBuilder(gui.Log, gui.GitCommand, gui.OSCommand, gui.Tr, gui.State.CherryPickedCommits) + builder := commands.NewCommitListBuilder(gui.Log, gui.GitCommand, gui.OSCommand, gui.Tr, gui.State.Modes.CherryPicking.CherryPickedCommits) commits, err := builder.GetCommits( commands.GetCommitsOptions{ Limit: gui.State.Panels.Commits.LimitCommits, - FilterPath: gui.State.FilterPath, + FilterPath: gui.State.Modes.Filtering.Path, IncludeRebaseCommits: true, RefName: "HEAD", }, @@ -555,7 +555,7 @@ func (gui *Gui) handleOpenSearchForCommitsPanel(g *gocui.Gui, v *gocui.View) err } func (gui *Gui) handleResetCherryPick(g *gocui.Gui, v *gocui.View) error { - gui.State.CherryPickedCommits = []*commands.Commit{} + gui.State.Modes.CherryPicking.CherryPickedCommits = []*commands.Commit{} return gui.Contexts.BranchCommits.Context.HandleRender() } |