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:
Diffstat (limited to 'internal/git/hooks_options.go')
-rw-r--r--internal/git/hooks_options.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/git/hooks_options.go b/internal/git/hooks_options.go
index c99f87f92..54c40a37b 100644
--- a/internal/git/hooks_options.go
+++ b/internal/git/hooks_options.go
@@ -12,8 +12,13 @@ import (
"gitlab.com/gitlab-org/gitaly/v15/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v15/internal/transaction/txinfo"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
+ labkittracing "gitlab.com/gitlab-org/labkit/tracing"
)
+// envInjector is responsible for injecting environment variables required for tracing into
+// the child process.
+var envInjector = labkittracing.NewEnvInjector()
+
// WithDisabledHooks returns an option that satisfies the requirement to set up
// hooks, but won't in fact set up hook execution.
func WithDisabledHooks() CmdOpt {
@@ -124,6 +129,7 @@ func (cc *cmdCfg) configureHooks(
payload,
fmt.Sprintf("%s=%s", log.GitalyLogDirEnvKey, cfg.Logging.Dir),
)
+ cc.env = envInjector(ctx, cc.env)
cc.globals = append(cc.globals, ConfigPair{Key: "core.hooksPath", Value: gitCmdFactory.HooksPath(ctx)})
cc.hooksConfigured = true