mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
fix incorrect checked out branch display
This commit is contained in:
@ -183,6 +183,9 @@ func getGitBranches() []Branch {
|
|||||||
for i, line := range branchLines {
|
for i, line := range branchLines {
|
||||||
branches = append(branches, branchFromLine(line, i))
|
branches = append(branches, branchFromLine(line, i))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// TODO: DRY this up
|
||||||
|
branches = append(branches, branchFromLine(gitCurrentBranchName(), 0))
|
||||||
}
|
}
|
||||||
branches = getAndMergeFetchedBranches(branches)
|
branches = getAndMergeFetchedBranches(branches)
|
||||||
return branches
|
return branches
|
||||||
@ -525,7 +528,7 @@ func gitCurrentBranchName() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return branchName
|
return strings.TrimSpace(branchName)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getBranchesCommand = `set -e
|
const getBranchesCommand = `set -e
|
||||||
|
Reference in New Issue
Block a user