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:
authorPavlo Strokov <pstrokov@gitlab.com>2021-05-09 18:05:54 +0300
committerToon Claes <toon@gitlab.com>2021-05-17 16:44:20 +0300
commitad907a414ed81d0ca65ac48f88d97c0e6bd0d3c6 (patch)
tree4da4081f82e9daa499ef48ffe468f086d90c6511 /cmd/gitaly-hooks
parenta7135eb9f8b9bdd550af154b2a291dc097bf13ba (diff)
Break dependency of the CloneRepoAtStorage on the global config.Config
In order to get rid of the global variable config.Config we change CloneRepoAtStorage function to accept config.Cfg as an input parameter. We use locally defined instance of the config.Cfg type to call modified function, so the usage of it is no longer depend on the config.Config variable. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2699
Diffstat (limited to 'cmd/gitaly-hooks')
-rw-r--r--cmd/gitaly-hooks/hooks_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go
index b9b40a2e8..b41fe48ee 100644
--- a/cmd/gitaly-hooks/hooks_test.go
+++ b/cmd/gitaly-hooks/hooks_test.go
@@ -269,7 +269,7 @@ func TestHooksUpdate(t *testing.T) {
}
func testHooksUpdate(t *testing.T, cfg config.Cfg, glValues glHookValues) {
- repo, repoPath, cleanup := gittest.CloneRepoAtStorage(t, cfg.Storages[0], t.Name())
+ repo, repoPath, cleanup := gittest.CloneRepoAtStorage(t, cfg, cfg.Storages[0], t.Name())
t.Cleanup(cleanup)
refval, oldval, newval := "refval", strings.Repeat("a", 40), strings.Repeat("b", 40)