summaryrefslogtreecommitdiffstats
path: root/pkg/app
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-02 10:34:33 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-09 14:09:53 +1100
commitf503ff1ecbfda00dfa4e68e38d41aceaf9b4400c (patch)
treee113663684406ca893ebb9c223d1fddbc65abea9 /pkg/app
parent4a1d23dc27f61e936fb3b582f02e2bba473c3b19 (diff)
start breaking up git struct
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/app.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index c1a28ff1c..99218b0c8 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -32,7 +32,6 @@ type App struct {
closers []io.Closer
Config config.AppConfigurer
OSCommand *oscommands.OSCommand
- GitCommand *commands.GitCommand
Gui *gui.Gui
Updater *updates.Updater // may only need this on the Gui
ClientContext string
@@ -122,7 +121,7 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
return app, nil
}
- app.OSCommand = oscommands.NewOSCommand(app.Common, oscommands.GetPlatform())
+ app.OSCommand = oscommands.NewOSCommand(app.Common, oscommands.GetPlatform(), oscommands.NewNullGuiIO(log))
app.Updater, err = updates.NewUpdater(app.Common, config, app.OSCommand)
if err != nil {
@@ -134,16 +133,9 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
return app, err
}
- app.GitCommand, err = commands.NewGitCommand(
- app.Common,
- app.OSCommand,
- git_config.NewStdCachedGitConfig(app.Log),
- )
- if err != nil {
- return app, err
- }
+ gitConfig := git_config.NewStdCachedGitConfig(app.Log)
- app.Gui, err = gui.NewGui(app.Common, app.GitCommand, app.OSCommand, config, app.Updater, filterPath, showRecentRepos)
+ app.Gui, err = gui.NewGui(app.Common, config, gitConfig, app.Updater, filterPath, showRecentRepos)
if err != nil {
return app, err
}