summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gitcommands.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitcommands.go b/gitcommands.go
index 4e6b043ed..774a821f1 100644
--- a/gitcommands.go
+++ b/gitcommands.go
@@ -541,6 +541,9 @@ func getGitBranches() []Branch {
return []Branch{constructBranch("", gitCurrentBranchName(), 0)}
}
branches := getBranches()
+ if len(branches) == 0 {
+ branches = append(branches, constructBranch("", gitCurrentBranchName(), 0))
+ }
branches = getAndMergeFetchedBranches(branches)
return branches
}