mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
21 lines
446 B
Go
21 lines
446 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.FullRefName())
|
|
|
|
task = NewRunPtyTask(cmdObj.GetCmd())
|
|
}
|
|
|
|
return gui.refreshMainViews(refreshMainOpts{
|
|
main: &viewUpdateOpts{
|
|
title: "Log",
|
|
task: task,
|
|
},
|
|
})
|
|
}
|