1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

pull branch model out into models package

This commit is contained in:
Jesse Duffield
2020-09-29 18:34:01 +10:00
parent c87b2c02fa
commit 44248d9ab0
9 changed files with 35 additions and 29 deletions

View File

@ -5,12 +5,12 @@ import (
"strings"
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
func GetBranchListDisplayStrings(branches []*commands.Branch, fullDescription bool, diffName string) [][]string {
func GetBranchListDisplayStrings(branches []*models.Branch, fullDescription bool, diffName string) [][]string {
lines := make([][]string, len(branches))
for i := range branches {
@ -22,7 +22,7 @@ func GetBranchListDisplayStrings(branches []*commands.Branch, fullDescription bo
}
// getBranchDisplayStrings returns the display string of branch
func getBranchDisplayStrings(b *commands.Branch, fullDescription bool, diffed bool) []string {
func getBranchDisplayStrings(b *models.Branch, fullDescription bool, diffed bool) []string {
displayName := b.Name
if b.DisplayName != "" {
displayName = b.DisplayName