1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-23 00:39:13 +02:00

introduce Common struct for passing around common stuff

This commit is contained in:
Jesse Duffield
2021-12-29 11:37:15 +11:00
parent b4c078d565
commit 18ab086126
15 changed files with 99 additions and 74 deletions

View File

@ -61,10 +61,12 @@ func (gui *Gui) refreshBranches() {
}
}
builder, err := commands.NewBranchListBuilder(gui.Log, gui.GitCommand, reflogCommits)
if err != nil {
_ = gui.surfaceError(err)
}
builder := commands.NewBranchListBuilder(
gui.Common,
gui.GitCommand.GetRawBranches,
gui.GitCommand.CurrentBranchName,
reflogCommits,
)
gui.State.Branches = builder.Build()
if err := gui.postRefreshUpdate(gui.State.Contexts.Branches); err != nil {