move models folder into commands folder

This commit is contained in:
Jesse Duffield 2020-09-29 20:28:39 +10:00
parent 83748d78f8
commit ce6f8ed1bc
50 changed files with 41 additions and 41 deletions

View file

@ -6,8 +6,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/models"
) )
// RenameCommit renames the topmost commit with the given name // RenameCommit renames the topmost commit with the given name

View file

@ -7,7 +7,7 @@ import (
"time" "time"
"github.com/go-errors/errors" "github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -12,10 +12,10 @@ import (
"github.com/go-errors/errors" "github.com/go-errors/errors"
gogit "github.com/go-git/go-git/v5" gogit "github.com/go-git/go-git/v5"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/test" "github.com/jesseduffield/lazygit/pkg/test"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View file

@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View file

@ -3,8 +3,8 @@ package commands
import ( import (
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/models"
) )
// GetFilesInDiff get the specified commit files // GetFilesInDiff get the specified commit files

View file

@ -11,9 +11,9 @@ import (
"strings" "strings"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/models"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -5,8 +5,8 @@ import (
"regexp" "regexp"
"strconv" "strconv"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/models"
) )
// GetReflogCommits only returns the new reflog commits since the given lastReflogCommit // GetReflogCommits only returns the new reflog commits since the given lastReflogCommit

View file

@ -6,7 +6,7 @@ import (
"sort" "sort"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
func (c *GitCommand) GetRemotes() ([]*models.Remote, error) { func (c *GitCommand) GetRemotes() ([]*models.Remote, error) {

View file

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"github.com/go-errors/errors" "github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/models"
) )
// DeletePatchesFromCommit applies a patch in reverse for a commit // DeletePatchesFromCommit applies a patch in reverse for a commit

View file

@ -5,8 +5,8 @@ import (
"strings" "strings"
"github.com/go-errors/errors" "github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/models"
) )
// Service is a service that repository is on (Github, Bitbucket, ...) // Service is a service that repository is on (Github, Bitbucket, ...)

View file

@ -5,7 +5,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -9,7 +9,7 @@ import (
"strings" "strings"
"github.com/go-errors/errors" "github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/mgutz/str" "github.com/mgutz/str"
) )

View file

@ -1,7 +1,7 @@
package commands package commands
import ( import (
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
func (c *GitCommand) AddRemote(name string, url string) error { func (c *GitCommand) AddRemote(name string, url string) error {

View file

@ -5,7 +5,7 @@ import (
"os" "os"
"regexp" "regexp"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// .gitmodules looks like this: // .gitmodules looks like this:

View file

@ -6,7 +6,7 @@ import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -1,6 +1,6 @@
package gui package gui
import "github.com/jesseduffield/lazygit/pkg/models" import "github.com/jesseduffield/lazygit/pkg/commands/models"
// you can only copy from one context at a time, because the order and position of commits matter // you can only copy from one context at a time, because the order and position of commits matter

View file

@ -2,7 +2,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
func (gui *Gui) getSelectedCommitFile() *models.CommitFile { func (gui *Gui) getSelectedCommitFile() *models.CommitFile {

View file

@ -5,7 +5,7 @@ import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -8,7 +8,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,7 +2,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
func (gui *Gui) submoduleFromFile(file *models.File) *models.SubmoduleConfig { func (gui *Gui) submoduleFromFile(file *models.File) *models.SubmoduleConfig {

View file

@ -5,7 +5,7 @@ import (
"path/filepath" "path/filepath"
"github.com/fsnotify/fsnotify" "github.com/fsnotify/fsnotify"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View file

@ -14,7 +14,7 @@ import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
"github.com/mgutz/str" "github.com/mgutz/str"
) )

View file

@ -22,11 +22,11 @@ import (
"github.com/golang-collections/collections/stack" "github.com/golang-collections/collections/stack"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/tasks" "github.com/jesseduffield/lazygit/pkg/tasks"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/updates" "github.com/jesseduffield/lazygit/pkg/updates"

View file

@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,8 +2,8 @@ package presentation
import ( import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -4,7 +4,7 @@ import (
"strings" "strings"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,7 +2,7 @@ package presentation
import ( import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,7 +2,7 @@ package presentation
import ( import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -1,7 +1,7 @@
package presentation package presentation
import ( import (
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -1,7 +1,7 @@
package presentation package presentation
import ( import (
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -1,7 +1,7 @@
package presentation package presentation
import ( import (
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,7 +2,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -6,7 +6,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/utils" "github.com/jesseduffield/lazygit/pkg/utils"
) )

View file

@ -2,7 +2,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -3,7 +3,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions

View file

@ -2,7 +2,7 @@ package gui
import ( import (
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/models" "github.com/jesseduffield/lazygit/pkg/commands/models"
) )
// list panel functions // list panel functions