summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-30 09:53:28 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit51547e38227b2443de955f4d17d46429039cf9f1 (patch)
treec1d8eccaa7736713b01cb00b574e9ed65c60bc8d /pkg/gui/branches_panel.go
parente363606fb6eeff130e38466f5a63a3a8c0e6ec0d (diff)
move all refresh code into the one file
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 1efde5c28..59160bc0f 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -47,36 +47,6 @@ func (gui *Gui) branchesRenderToMain() error {
})
}
-// gui.refreshStatus is called at the end of this because that's when we can
-// be sure there is a state.Branches array to pick the current branch from
-func (gui *Gui) refreshBranches() {
- reflogCommits := gui.State.FilteredReflogCommits
- if gui.State.Modes.Filtering.Active() {
- // in filter mode we filter our reflog commits to just those containing the path
- // however we need all the reflog entries to populate the recencies of our branches
- // which allows us to order them correctly. So if we're filtering we'll just
- // manually load all the reflog commits here
- var err error
- reflogCommits, _, err = gui.git.Loaders.ReflogCommits.GetReflogCommits(nil, "")
- if err != nil {
- gui.c.Log.Error(err)
- }
- }
-
- branches, err := gui.git.Loaders.Branches.Load(reflogCommits)
- if err != nil {
- _ = gui.c.Error(err)
- }
-
- gui.State.Branches = branches
-
- if err := gui.c.PostRefreshUpdate(gui.State.Contexts.Branches); err != nil {
- gui.c.Log.Error(err)
- }
-
- gui.refreshStatus()
-}
-
// specific functions
func (gui *Gui) handleBranchPress() error {