summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-29 18:41:06 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-29 20:48:49 +1000
commiteda4619a4f05b6720d091b31e60515f7289b9a47 (patch)
tree86c39ebf92ffc21c5abe751a6faf151788083242 /pkg/gui
parente849ca337237f564dd90a09e40b9ca8f9d62352a (diff)
move remotes and remote branches
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/custom_commands.go4
-rw-r--r--pkg/gui/gui.go4
-rw-r--r--pkg/gui/presentation/remote_branches.go6
-rw-r--r--pkg/gui/presentation/remotes.go6
-rw-r--r--pkg/gui/remote_branches_panel.go4
-rw-r--r--pkg/gui/remotes_panel.go4
6 files changed, 14 insertions, 14 deletions
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go
index 51e929bab..c28528cac 100644
--- a/pkg/gui/custom_commands.go
+++ b/pkg/gui/custom_commands.go
@@ -19,8 +19,8 @@ type CustomCommandObjects struct {
SelectedSubCommit *models.Commit
SelectedFile *commands.File
SelectedLocalBranch *models.Branch
- SelectedRemoteBranch *commands.RemoteBranch
- SelectedRemote *commands.Remote
+ SelectedRemoteBranch *models.RemoteBranch
+ SelectedRemote *models.Remote
SelectedTag *models.Tag
SelectedStashEntry *commands.StashEntry
SelectedCommitFile *commands.CommitFile
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 4028e452b..8d68612de 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -286,8 +286,8 @@ type guiState struct {
// one and the same
ReflogCommits []*models.Commit
SubCommits []*models.Commit
- Remotes []*commands.Remote
- RemoteBranches []*commands.RemoteBranch
+ Remotes []*models.Remote
+ RemoteBranches []*models.RemoteBranch
Tags []*models.Tag
MenuItems []*menuItem
Updating bool
diff --git a/pkg/gui/presentation/remote_branches.go b/pkg/gui/presentation/remote_branches.go
index e52e6d7f3..5d1c76709 100644
--- a/pkg/gui/presentation/remote_branches.go
+++ b/pkg/gui/presentation/remote_branches.go
@@ -1,12 +1,12 @@
package presentation
import (
- "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 GetRemoteBranchListDisplayStrings(branches []*commands.RemoteBranch, diffName string) [][]string {
+func GetRemoteBranchListDisplayStrings(branches []*models.RemoteBranch, diffName string) [][]string {
lines := make([][]string, len(branches))
for i := range branches {
@@ -18,7 +18,7 @@ func GetRemoteBranchListDisplayStrings(branches []*commands.RemoteBranch, diffNa
}
// getRemoteBranchDisplayStrings returns the display string of branch
-func getRemoteBranchDisplayStrings(b *commands.RemoteBranch, diffed bool) []string {
+func getRemoteBranchDisplayStrings(b *models.RemoteBranch, diffed bool) []string {
nameColorAttr := GetBranchColor(b.Name)
if diffed {
nameColorAttr = theme.DiffTerminalColor
diff --git a/pkg/gui/presentation/remotes.go b/pkg/gui/presentation/remotes.go
index 5ad5f77c8..2c099fb18 100644
--- a/pkg/gui/presentation/remotes.go
+++ b/pkg/gui/presentation/remotes.go
@@ -4,12 +4,12 @@ import (
"fmt"
"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 GetRemoteListDisplayStrings(remotes []*commands.Remote, diffName string) [][]string {
+func GetRemoteListDisplayStrings(remotes []*models.Remote, diffName string) [][]string {
lines := make([][]string, len(remotes))
for i := range remotes {
@@ -21,7 +21,7 @@ func GetRemoteListDisplayStrings(remotes []*commands.Remote, diffName string) []
}
// getRemoteDisplayStrings returns the display string of branch
-func getRemoteDisplayStrings(r *commands.Remote, diffed bool) []string {
+func getRemoteDisplayStrings(r *models.Remote, diffed bool) []string {
branchCount := len(r.Branches)
nameColorAttr := theme.DefaultTextColor
diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go
index aec02b4c0..12587447a 100644
--- a/pkg/gui/remote_branches_panel.go
+++ b/pkg/gui/remote_branches_panel.go
@@ -4,12 +4,12 @@ import (
"fmt"
"github.com/jesseduffield/gocui"
- "github.com/jesseduffield/lazygit/pkg/commands"
+ "github.com/jesseduffield/lazygit/pkg/models"
)
// list panel functions
-func (gui *Gui) getSelectedRemoteBranch() *commands.RemoteBranch {
+func (gui *Gui) getSelectedRemoteBranch() *models.RemoteBranch {
selectedLine := gui.State.Panels.RemoteBranches.SelectedLineIdx
if selectedLine == -1 || len(gui.State.RemoteBranches) == 0 {
return nil
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go
index 102ba9e33..2d0827592 100644
--- a/pkg/gui/remotes_panel.go
+++ b/pkg/gui/remotes_panel.go
@@ -6,13 +6,13 @@ import (
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
- "github.com/jesseduffield/lazygit/pkg/commands"
+ "github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/utils"
)
// list panel functions
-func (gui *Gui) getSelectedRemote() *commands.Remote {
+func (gui *Gui) getSelectedRemote() *models.Remote {
selectedLine := gui.State.Panels.Remotes.SelectedLineIdx
if selectedLine == -1 || len(gui.State.Remotes) == 0 {
return nil