From 8347dcd67149e329d3c23c7453a59b12e2d5533d Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 17 Nov 2019 14:08:56 +1100 Subject: [PATCH] make upstream branch display more lenient on git errors --- pkg/gui/branches_panel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index ca7ca23e8..c3fd37f26 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -56,7 +56,7 @@ func (gui *Gui) handleBranchSelect(g *gocui.Gui, v *gocui.View) error { }() go func() { upstream, _ := gui.GitCommand.GetUpstreamForBranch(branch.Name) - if strings.Contains(upstream, "no upstream configured for branch") { + if strings.Contains(upstream, "no upstream configured for branch") || strings.Contains(upstream, "unknown revision or path not in the working tree") { upstream = gui.Tr.SLocalize("notTrackingRemote") } graph, err := gui.GitCommand.GetBranchGraph(branch.Name)