mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-28 09:08:41 +02:00
handle error from git log that arises from lack of tracking
This commit is contained in:
parent
ba9485ae57
commit
6985e52949
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
)
|
||||
@ -90,7 +91,10 @@ func handleBranchSelect(g *gocui.Gui, v *gocui.View) error {
|
||||
}
|
||||
go func() {
|
||||
branch := getSelectedBranch(v)
|
||||
diff, _ := getBranchGraph(branch.Name, branch.BaseBranch)
|
||||
diff, err := getBranchGraph(branch.Name, branch.BaseBranch)
|
||||
if err != nil && strings.HasPrefix(diff, "fatal: ambiguous argument") {
|
||||
diff = "There is no tracking for this branch"
|
||||
}
|
||||
renderString(g, "main", diff)
|
||||
}()
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user