From fc91ef6a59e3cf8336b1cef78c210907c08a4cda Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 23 Mar 2023 12:53:18 +1100 Subject: standardise helper args --- pkg/gui/controllers/helpers/host_helper.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'pkg/gui/controllers/helpers/host_helper.go') diff --git a/pkg/gui/controllers/helpers/host_helper.go b/pkg/gui/controllers/helpers/host_helper.go index b11bc32c2..06102cc13 100644 --- a/pkg/gui/controllers/helpers/host_helper.go +++ b/pkg/gui/controllers/helpers/host_helper.go @@ -1,7 +1,6 @@ package helpers import ( - "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands/hosting_service" ) @@ -13,17 +12,14 @@ type IHostHelper interface { } type HostHelper struct { - c *HelperCommon - git *commands.GitCommand + c *HelperCommon } func NewHostHelper( c *HelperCommon, - git *commands.GitCommand, ) *HostHelper { return &HostHelper{ - c: c, - git: git, + c: c, } } @@ -39,7 +35,7 @@ func (self *HostHelper) GetCommitURL(commitSha string) (string, error) { // from one invocation to the next. Note however that we're currently caching config // results so we might want to invalidate the cache here if it becomes a problem. func (self *HostHelper) getHostingServiceMgr() *hosting_service.HostingServiceMgr { - remoteUrl := self.git.Config.GetRemoteURL() + remoteUrl := self.c.Git().Config.GetRemoteURL() configServices := self.c.UserConfig.Services return hosting_service.NewHostingServiceMgr(self.c.Log, self.c.Tr, remoteUrl, configServices) } -- cgit v1.2.3