summaryrefslogtreecommitdiffstats
path: root/pkg/commands/remote.go
blob: b3c144b655ecf605401a1b5da15b49f9e49c1565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package commands

import (
	"fmt"

	"github.com/fatih/color"
	"github.com/jesseduffield/lazygit/pkg/utils"
)

// Remote : A git remote
type Remote struct {
	Name     string
	Urls     []string
	Selected bool
	Branches []*RemoteBranch
}

// GetDisplayStrings returns the display string of a remote
func (r *Remote) GetDisplayStrings(isFocused bool) []string {

	branchCount := len(r.Branches)

	return []string{r.Name, utils.ColoredString(fmt.Sprintf("%d branches", branchCount), color.FgBlue)}
}