diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-23 12:53:18 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 13:19:53 +1000 |
commit | fc91ef6a59e3cf8336b1cef78c210907c08a4cda (patch) | |
tree | 7a79860d3afbd04fc00c2b8be82b7c137299bbaa /pkg/gui/controllers/helpers/host_helper.go | |
parent | 43251e727596cca2538548976769e47a1bfc5593 (diff) |
standardise helper args
Diffstat (limited to 'pkg/gui/controllers/helpers/host_helper.go')
-rw-r--r-- | pkg/gui/controllers/helpers/host_helper.go | 10 |
1 files changed, 3 insertions, 7 deletions
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) } |