summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-29 18:48:38 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-29 20:48:49 +1000
commitf9643448a4ba186fb56d408a5ee8a21193986cd6 (patch)
treea15d3291ebc269536c3abbbf88542a25689a971c /pkg/gui
parent91f0b0e28fb93bf715a4fda67fcbb400ffbc680b (diff)
move commit files
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/commit_files_panel.go4
-rw-r--r--pkg/gui/custom_commands.go3
-rw-r--r--pkg/gui/gui.go2
-rw-r--r--pkg/gui/presentation/commit_files.go6
4 files changed, 7 insertions, 8 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go
index 5b244ba31..84356a833 100644
--- a/pkg/gui/commit_files_panel.go
+++ b/pkg/gui/commit_files_panel.go
@@ -2,10 +2,10 @@ package gui
import (
"github.com/jesseduffield/gocui"
- "github.com/jesseduffield/lazygit/pkg/commands"
+ "github.com/jesseduffield/lazygit/pkg/models"
)
-func (gui *Gui) getSelectedCommitFile() *commands.CommitFile {
+func (gui *Gui) getSelectedCommitFile() *models.CommitFile {
selectedLine := gui.State.Panels.CommitFiles.SelectedLineIdx
if selectedLine == -1 || selectedLine > len(gui.State.CommitFiles)-1 {
return nil
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go
index 9d2483587..c15052fb3 100644
--- a/pkg/gui/custom_commands.go
+++ b/pkg/gui/custom_commands.go
@@ -8,7 +8,6 @@ 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"
)
@@ -23,7 +22,7 @@ type CustomCommandObjects struct {
SelectedRemote *models.Remote
SelectedTag *models.Tag
SelectedStashEntry *models.StashEntry
- SelectedCommitFile *commands.CommitFile
+ SelectedCommitFile *models.CommitFile
CheckedOutBranch *models.Branch
PromptResponses []string
}
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 02bb27a65..6dc3bf12c 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -277,7 +277,7 @@ type guiState struct {
Branches []*models.Branch
Commits []*models.Commit
StashEntries []*models.StashEntry
- CommitFiles []*commands.CommitFile
+ CommitFiles []*models.CommitFile
// FilteredReflogCommits are the ones that appear in the reflog panel.
// when in filtering mode we only include the ones that match the given path
FilteredReflogCommits []*models.Commit
diff --git a/pkg/gui/presentation/commit_files.go b/pkg/gui/presentation/commit_files.go
index 51107bb83..01e56a1f3 100644
--- a/pkg/gui/presentation/commit_files.go
+++ b/pkg/gui/presentation/commit_files.go
@@ -2,13 +2,13 @@ package presentation
import (
"github.com/fatih/color"
- "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/commands/patch"
+ "github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
-func GetCommitFileListDisplayStrings(commitFiles []*commands.CommitFile, diffName string) [][]string {
+func GetCommitFileListDisplayStrings(commitFiles []*models.CommitFile, diffName string) [][]string {
if len(commitFiles) == 0 {
return [][]string{{utils.ColoredString("(none)", color.FgRed)}}
}
@@ -24,7 +24,7 @@ func GetCommitFileListDisplayStrings(commitFiles []*commands.CommitFile, diffNam
}
// getCommitFileDisplayStrings returns the display string of branch
-func getCommitFileDisplayStrings(f *commands.CommitFile, diffed bool) []string {
+func getCommitFileDisplayStrings(f *models.CommitFile, diffed bool) []string {
yellow := color.New(color.FgYellow)
green := color.New(color.FgGreen)
defaultColor := color.New(theme.DefaultTextColor)