1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

rename OSCommand field to os

This commit is contained in:
Jesse Duffield
2022-02-06 13:42:17 +11:00
parent d82f175e79
commit cd31a762b9
13 changed files with 32 additions and 22 deletions

View File

@ -83,9 +83,9 @@ type Repo string
// Gui wraps the gocui Gui object which handles rendering and events
type Gui struct {
*common.Common
g *gocui.Gui
git *commands.GitCommand
OSCommand *oscommands.OSCommand
g *gocui.Gui
git *commands.GitCommand
os *oscommands.OSCommand
// this is the state of the GUI for the current repo
State *GuiRepoState
@ -318,7 +318,7 @@ func (gui *Gui) onNewRepo(filterPath string, reuseState bool) error {
var err error
gui.git, err = commands.NewGitCommand(
gui.Common,
gui.OSCommand,
gui.os,
git_config.NewStdCachedGitConfig(gui.Log),
gui.Mutexes.SyncMutex,
)
@ -479,7 +479,7 @@ func NewGui(
osCommand := oscommands.NewOSCommand(cmn, oscommands.GetPlatform(), guiIO)
gui.OSCommand = osCommand
gui.os = osCommand
gui.watchFilesForChanges()
@ -509,7 +509,7 @@ func NewGui(
func (gui *Gui) resetControllers() {
controllerCommon := gui.c
osCommand := gui.OSCommand
osCommand := gui.os
rebaseHelper := controllers.NewRebaseHelper(controllerCommon, gui.State.Contexts, gui.git, gui.takeOverMergeConflictScrolling)
model := gui.State.Model
gui.helpers = &Helpers{
@ -977,7 +977,7 @@ func (gui *Gui) loadNewRepo() error {
return err
}
if err := gui.OSCommand.UpdateWindowTitle(); err != nil {
if err := gui.os.UpdateWindowTitle(); err != nil {
return err
}