mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
fix incorrect checked out branch display
This commit is contained in:
parent
9e5c04d57d
commit
694b192b74
1 changed files with 4 additions and 1 deletions
|
@ -183,6 +183,9 @@ func getGitBranches() []Branch {
|
|||
for i, line := range branchLines {
|
||||
branches = append(branches, branchFromLine(line, i))
|
||||
}
|
||||
} else {
|
||||
// TODO: DRY this up
|
||||
branches = append(branches, branchFromLine(gitCurrentBranchName(), 0))
|
||||
}
|
||||
branches = getAndMergeFetchedBranches(branches)
|
||||
return branches
|
||||
|
@ -525,7 +528,7 @@ func gitCurrentBranchName() string {
|
|||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return branchName
|
||||
return strings.TrimSpace(branchName)
|
||||
}
|
||||
|
||||
const getBranchesCommand = `set -e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue