1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

pull commit list builder functions into their own builder struct

This commit is contained in:
Jesse Duffield
2019-02-19 09:18:30 +11:00
parent a8e22ed82f
commit dcc7855fd0
4 changed files with 284 additions and 240 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/git"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@ -39,7 +40,11 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error {
func (gui *Gui) refreshCommits(g *gocui.Gui) error {
g.Update(func(*gocui.Gui) error {
commits, err := gui.GitCommand.GetCommits()
builder, err := git.NewCommitListBuilder(gui.Log, gui.GitCommand, gui.OSCommand)
if err != nil {
return err
}
commits, err := builder.GetCommits()
if err != nil {
return err
}