summaryrefslogtreecommitdiffstats
path: root/pkg/commands
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/commands
parent61b4bbf74eb9d4e402a2527ccc15b7ff15215fb4 (diff)
better presentation of remotes
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go5
-rw-r--r--pkg/commands/remote.go16
-rw-r--r--pkg/commands/stash_entry.go10
3 files changed, 4 insertions, 27 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 803cfe2d4..3b49a254e 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -170,9 +170,8 @@ func (c *GitCommand) GetStashEntries() []*StashEntry {
func stashEntryFromLine(line string, index int) *StashEntry {
return &StashEntry{
- Name: line,
- Index: index,
- DisplayString: line,
+ Name: line,
+ Index: index,
}
}
diff --git a/pkg/commands/remote.go b/pkg/commands/remote.go
index b3c144b65..1dc9f7e7f 100644
--- a/pkg/commands/remote.go
+++ b/pkg/commands/remote.go
@@ -1,24 +1,8 @@
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)}
-}
diff --git a/pkg/commands/stash_entry.go b/pkg/commands/stash_entry.go
index a47200fd4..94e4417d4 100644
--- a/pkg/commands/stash_entry.go
+++ b/pkg/commands/stash_entry.go
@@ -2,12 +2,6 @@ package commands
// StashEntry : A git stash entry
type StashEntry struct {
- Index int
- Name string
- DisplayString string
-}
-
-// GetDisplayStrings returns the display string of branch
-func (s *StashEntry) GetDisplayStrings(isFocused bool) []string {
- return []string{s.DisplayString}
+ Index int
+ Name string
}