1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/branches_panel.go
2022-03-17 19:13:40 +11:00

21 lines
437 B
Go

package gui
func (gui *Gui) branchesRenderToMain() error {
var task updateTask
branch := gui.State.Contexts.Branches.GetSelected()
if branch == nil {
task = NewRenderStringTask(gui.c.Tr.NoBranchesThisRepo)
} else {
cmdObj := gui.git.Branch.GetGraphCmdObj(branch.Name)
task = NewRunPtyTask(cmdObj.GetCmd())
}
return gui.refreshMainViews(refreshMainOpts{
main: &viewUpdateOpts{
title: "Log",
task: task,
},
})
}