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>2021-12-17 14:42:30 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-21 08:33:30 +0300
commit159ed4fe020799e6c0f0add4432389d67f1682fe (patch)
tree00780116e5c16b3b1fd134c35a39c5c841c061ab /internal/gitaly/server/auth_test.go
parent012ed9e0df51f95558a4f0ebbbe768faa2af5d3a (diff)
hook: Resolve Git binary path via command factory
The Git binary path for the gitaly-git2go executor is currently resolved by accessing the configured Git path directly. This is deprecated, where callers should instead ask the Git command factory for the Git execution environment. Convert the custom hooks executor to accept a Git command factory and query it for the binary path.
Diffstat (limited to 'internal/gitaly/server/auth_test.go')
-rw-r--r--internal/gitaly/server/auth_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/server/auth_test.go b/internal/gitaly/server/auth_test.go
index 44ffcf08c..44473ee3d 100644
--- a/internal/gitaly/server/auth_test.go
+++ b/internal/gitaly/server/auth_test.go
@@ -194,10 +194,10 @@ func runServer(t *testing.T, cfg config.Cfg) string {
t.Cleanup(func() { conns.Close() })
locator := config.NewLocator(cfg)
txManager := transaction.NewManager(cfg, registry)
- hookManager := hook.NewManager(locator, txManager, gitlab.NewMockClient(
- t, gitlab.MockAllowed, gitlab.MockPreReceive, gitlab.MockPostReceive,
- ), cfg)
gitCmdFactory := git.NewExecCommandFactory(cfg)
+ hookManager := hook.NewManager(cfg, locator, gitCmdFactory, txManager, gitlab.NewMockClient(
+ t, gitlab.MockAllowed, gitlab.MockPreReceive, gitlab.MockPostReceive,
+ ))
catfileCache := catfile.NewCache(cfg)
t.Cleanup(catfileCache.Stop)
diskCache := cache.New(cfg, locator)