diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-07 00:41:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-07 00:41:59 +1000 |
commit | 694b192b7452c98aafa523ab7ba4dc8f5abecdd2 (patch) | |
tree | a33b4b36ddee70de083dc15b7996837cb4ea34d9 /gitcommands.go | |
parent | 9e5c04d57d4516f027543ba25f3698411cc99a70 (diff) |
fix incorrect checked out branch display
Diffstat (limited to 'gitcommands.go')
-rw-r--r-- | gitcommands.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gitcommands.go b/gitcommands.go index bf1a90026..80bbef860 100644 --- a/gitcommands.go +++ b/gitcommands.go @@ -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 |