blob: 6e9a8e779aae412a5f29b770babf528fe77015b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package gui
import "github.com/jesseduffield/lazygit/pkg/gui/types"
func (gui *Gui) remoteBranchesRenderToMain() error {
var task types.UpdateTask
remoteBranch := gui.State.Contexts.RemoteBranches.GetSelected()
if remoteBranch == nil {
task = types.NewRenderStringTask("No branches for this remote")
} else {
cmdObj := gui.git.Branch.GetGraphCmdObj(remoteBranch.FullRefName())
task = types.NewRunCommandTask(cmdObj.GetCmd())
}
return gui.c.RenderToMainViews(types.RefreshMainOpts{
Pair: gui.c.MainViewPairs().Normal,
Main: &types.ViewUpdateOpts{
Title: "Remote Branch",
Task: task,
},
})
}
|