1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

better presentation of remotes

This commit is contained in:
Jesse Duffield
2020-03-27 22:53:50 +11:00
parent 61b4bbf74e
commit d0336fe16f
5 changed files with 12 additions and 29 deletions

View File

@ -1,7 +1,11 @@
package presentation
import (
"fmt"
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/utils"
)
func GetRemoteListDisplayStrings(remotes []*commands.Remote) [][]string {
@ -16,5 +20,7 @@ func GetRemoteListDisplayStrings(remotes []*commands.Remote) [][]string {
// getRemoteDisplayStrings returns the display string of branch
func getRemoteDisplayStrings(r *commands.Remote) []string {
return []string{r.Name}
branchCount := len(r.Branches)
return []string{r.Name, utils.ColoredString(fmt.Sprintf("%d branches", branchCount), color.FgBlue)}
}