summaryrefslogtreecommitdiffstats
path: root/pkg/gui/remote_branches_panel.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/remote_branches_panel.go')
-rw-r--r--pkg/gui/remote_branches_panel.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go
index f47ea9f63..771a7a9ad 100644
--- a/pkg/gui/remote_branches_panel.go
+++ b/pkg/gui/remote_branches_panel.go
@@ -81,3 +81,14 @@ func (gui *Gui) renderRemoteBranchesWithSelection() error {
return nil
}
+
+func (gui *Gui) handleCheckoutRemoteBranch(g *gocui.Gui, v *gocui.View) error {
+ remoteBranch := gui.getSelectedRemoteBranch()
+ if remoteBranch == nil {
+ return nil
+ }
+ if err := gui.handleCheckoutBranch(remoteBranch.RemoteName + "/" + remoteBranch.Name); err != nil {
+ return err
+ }
+ return gui.switchBranchesPanelContext("local-branches")
+}