split RemoteBranch out from Branch

This commit is contained in:
Jesse Duffield
2019-11-21 22:07:14 +11:00
parent b7f2d0366b
commit 1f3e1720a3
8 changed files with 46 additions and 17 deletions
+18
View File
@@ -0,0 +1,18 @@
package commands
import (
"github.com/jesseduffield/lazygit/pkg/utils"
)
// Remote Branch : A git remote branch
type RemoteBranch struct {
Name string
Selected bool
}
// GetDisplayStrings returns the display string of branch
func (b *RemoteBranch) GetDisplayStrings(isFocused bool) []string {
displayName := utils.ColoredString(b.Name, GetBranchColor(b.Name))
return []string{displayName}
}