mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
ensure current branch is on top of the branch list
This commit is contained in:
parent
c8bacb4186
commit
2b37c9b19c
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue