diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-18 11:36:35 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-19 09:42:55 +0300 |
commit | c0fae08db4a3d19a86d899ae94296e022ab0ac26 (patch) | |
tree | 667330537b85ebff006afa9341f8e7f75c18fba5 /internal/gitaly/service/setup/register.go | |
parent | d8711fed302af9802e69d543b7e5a57bbaeeac3a (diff) |
service: Simplify injection of dependencies for Diff server
While we already have a `service.Dependencies` type around for quite a
long time, we still pass in dependencies explicitly when constructing
the actual server. This makes it harder than necessary to make a server
require more dependencies as you will have to adjust all callsites where
the server is currently getting constructed.
Simplify the code to instead inject the `service.Dependencies` type into
the server directly. This will allow us to propagate dependencies more
readily in the future.
Diffstat (limited to 'internal/gitaly/service/setup/register.go')
-rw-r--r-- | internal/gitaly/service/setup/register.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/gitaly/service/setup/register.go b/internal/gitaly/service/setup/register.go index f19f3aa5b..c53843498 100644 --- a/internal/gitaly/service/setup/register.go +++ b/internal/gitaly/service/setup/register.go @@ -55,11 +55,7 @@ func RegisterAll(srv *grpc.Server, deps *service.Dependencies) { gitalypb.RegisterBlobServiceServer(srv, blob.NewServer(deps)) gitalypb.RegisterCleanupServiceServer(srv, cleanup.NewServer(deps)) gitalypb.RegisterCommitServiceServer(srv, commit.NewServer(deps)) - gitalypb.RegisterDiffServiceServer(srv, diff.NewServer( - deps.GetLocator(), - deps.GetGitCmdFactory(), - deps.GetCatfileCache(), - )) + gitalypb.RegisterDiffServiceServer(srv, diff.NewServer(deps)) gitalypb.RegisterNamespaceServiceServer(srv, namespace.NewServer(deps.GetLocator())) gitalypb.RegisterOperationServiceServer(srv, operations.NewServer( deps.GetHookManager(), |