summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-27 22:53:50 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:59:45 +1100
commitd0336fe16f3a365eb9bfff1086a4c02277e1f5dd (patch)
tree73a8ed563db983bac40c425d226be206471555f6 /pkg/gui
parent61b4bbf74eb9d4e402a2527ccc15b7ff15215fb4 (diff)
better presentation of remotes
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/presentation/remotes.go8
-rw-r--r--pkg/gui/presentation/stash_entries.go2
2 files changed, 8 insertions, 2 deletions
diff --git a/pkg/gui/presentation/remotes.go b/pkg/gui/presentation/remotes.go
index 24fcd0b97..3adfad858 100644
--- a/pkg/gui/presentation/remotes.go
+++ b/pkg/gui/presentation/remotes.go
@@ -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)}
}
diff --git a/pkg/gui/presentation/stash_entries.go b/pkg/gui/presentation/stash_entries.go
index 8598b5e5f..a5557a433 100644
--- a/pkg/gui/presentation/stash_entries.go
+++ b/pkg/gui/presentation/stash_entries.go
@@ -16,5 +16,5 @@ func GetStashEntryListDisplayStrings(stashEntries []*commands.StashEntry) [][]st
// getStashEntryDisplayStrings returns the display string of branch
func getStashEntryDisplayStrings(s *commands.StashEntry) []string {
- return []string{s.DisplayString}
+ return []string{s.Name}
}