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>2022-05-19 13:44:23 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-05-25 08:17:28 +0300
commit5124a65907f88ceb16af4511b31cdfb3077a4247 (patch)
tree83beb9f25512973fe9af89b295d0b4c8deeae69f
parentdc5542e9bc3155987ba23d53a1076a03e408420b (diff)
git2go: Inject Git environment variables
The git2go executor is not injecting Git environment variables when spawning `gitaly-git2go`. This is a strict requirement though because we're sometimes spawning git-apply(1) from it, and Git commands must have the environment variables of the Git execution environment set up. Fix this by injecting the environment variables.
-rw-r--r--internal/git2go/executor.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/git2go/executor.go b/internal/git2go/executor.go
index d1ab916a1..899c7e64e 100644
--- a/internal/git2go/executor.go
+++ b/internal/git2go/executor.go
@@ -56,6 +56,7 @@ func (b *Executor) run(ctx context.Context, repo repository.GitRepo, stdin io.Re
}
env := alternates.Env(repoPath, repo.GetGitObjectDirectory(), repo.GetGitAlternateObjectDirectories())
+ env = append(env, b.gitCmdFactory.GetExecutionEnvironment(ctx).EnvironmentVariables...)
// Pass the log output directly to gitaly-git2go. No need to reinterpret
// these logs as long as the destination is an append-only file. See