From 41222f07edc9d55dc43a0f5b4b8f865568271ae7 Mon Sep 17 00:00:00 2001 From: Ryooooooga Date: Tue, 27 Dec 2022 00:03:27 +0900 Subject: [PATCH] chore(gui): remove unused `gitConfig` --- pkg/app/app.go | 5 +---- pkg/gui/dummies.go | 3 +-- pkg/gui/gui.go | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/app/app.go b/pkg/app/app.go index 899325142..158841667 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -17,7 +17,6 @@ import ( appTypes "github.com/jesseduffield/lazygit/pkg/app/types" "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" - "github.com/jesseduffield/lazygit/pkg/commands/git_config" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/config" @@ -106,9 +105,7 @@ func NewApp(config config.AppConfigurer, common *common.Common) (*App, error) { return app, err } - gitConfig := git_config.NewStdCachedGitConfig(app.Log) - - app.Gui, err = gui.NewGui(common, config, gitConfig, app.Updater, showRecentRepos, dirName) + app.Gui, err = gui.NewGui(common, config, app.Updater, showRecentRepos, dirName) if err != nil { return app, err } diff --git a/pkg/gui/dummies.go b/pkg/gui/dummies.go index 52112e122..f0825957c 100644 --- a/pkg/gui/dummies.go +++ b/pkg/gui/dummies.go @@ -1,7 +1,6 @@ package gui import ( - "github.com/jesseduffield/lazygit/pkg/commands/git_config" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/updates" @@ -17,6 +16,6 @@ func NewDummyUpdater() *updates.Updater { func NewDummyGui() *Gui { newAppConfig := config.NewDummyAppConfig() - dummyGui, _ := NewGui(utils.NewDummyCommon(), newAppConfig, git_config.NewFakeGitConfig(nil), NewDummyUpdater(), false, "") + dummyGui, _ := NewGui(utils.NewDummyCommon(), newAppConfig, NewDummyUpdater(), false, "") return dummyGui } diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 80b18661b..7475476c4 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -341,7 +341,6 @@ func initialContext(contextTree *context.ContextTree, startArgs appTypes.StartAr func NewGui( cmn *common.Common, config config.AppConfigurer, - gitConfig git_config.IGitConfig, updater *updates.Updater, showRecentRepos bool, initialDir string,