From dcc7855fd0f04d68fa809d586ac7f45a534f7b25 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 19 Feb 2019 09:18:30 +1100 Subject: pull commit list builder functions into their own builder struct --- pkg/gui/commits_panel.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkg/gui') diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 374f7ccf0..f1d443731 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -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 } -- cgit v1.2.3