1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-10 04:07:18 +02:00
lazygit/pkg/gui/remote_branches_panel.go
2022-08-06 13:49:11 +10:00

21 lines
528 B
Go

package gui
func (gui *Gui) remoteBranchesRenderToMain() error {
var task updateTask
remoteBranch := gui.State.Contexts.RemoteBranches.GetSelected()
if remoteBranch == nil {
task = NewRenderStringTask("No branches for this remote")
} else {
cmdObj := gui.git.Branch.GetGraphCmdObj(remoteBranch.FullRefName())
task = NewRunCommandTask(cmdObj.GetCmd())
}
return gui.refreshMainViews(refreshMainOpts{
pair: gui.normalMainContextPair(),
main: &viewUpdateOpts{
title: "Remote Branch",
task: task,
},
})
}