diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-11-20 13:24:02 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-11-20 15:38:16 +0300 |
commit | 29c8e196535756c3a4c777f8bf33e2299a3ff3f0 (patch) | |
tree | 926e4bb5661ec906710b0de5154490ab6be77b5e /internal/gitaly/service/operations/merge.go | |
parent | 18b6b90be0d0c8be0bafdfe8ac5937f186c66cab (diff) |
gitlabshell: Remove `Env()` in favor of `EnvFromConfig()`
It's not at all obvious what the `gitlabshell.Env()` derives from as it
doesn't receive any input parameters. Turns out, it's using values from
Gitaly's configuration and puts those into the environment in order for
any called executable to be able to figure out what's what. Most
importantly, this will include the Gitaly binary directory, but also its
socket path.
Let's make this a bit more explicit by converting all users to
`gitlabshell.EnvFromConfig()`. This also gets rid of one more location
which implicitly used the global configuration.
Diffstat (limited to 'internal/gitaly/service/operations/merge.go')
-rw-r--r-- | internal/gitaly/service/operations/merge.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gitaly/service/operations/merge.go b/internal/gitaly/service/operations/merge.go index 73ce55c95..466f7fdaa 100644 --- a/internal/gitaly/service/operations/merge.go +++ b/internal/gitaly/service/operations/merge.go @@ -110,7 +110,7 @@ func validateMergeBranchRequest(request *gitalypb.UserMergeBranchRequest) error } func (s *server) updateReferenceWithHooks(ctx context.Context, repo *gitalypb.Repository, user *gitalypb.User, reference, newrev, oldrev string) error { - gitlabshellEnv, err := gitlabshell.Env() + gitlabshellEnv, err := gitlabshell.EnvFromConfig(s.cfg) if err != nil { return err } |