Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-18 11:36:35 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-19 09:42:55 +0300
commitc0fae08db4a3d19a86d899ae94296e022ab0ac26 (patch)
tree667330537b85ebff006afa9341f8e7f75c18fba5 /internal/gitaly/service/setup/register.go
parentd8711fed302af9802e69d543b7e5a57bbaeeac3a (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.go6
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(),