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-02-22 14:22:43 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-03-02 10:45:48 +0300
commitb547b368c8f584e9aabe8eef9342f99440b0c248 (patch)
treead9113ac5e4c3577e5a5518e27d076572f8fddc5
parentc0d05650be681c2accb4cec5aac74a6dd77a2fa6 (diff)
git: Support bundled Git v2.35.1.gl1pks-git-v2.35.1.gl0
We now have support in place for different bundled Git execution environments, and a preceding commit has already started to build and install bundled Git v2.35.1.gl1. Add support for this new bundled Git execution environment behind a feature flag. Changelog: added
-rw-r--r--internal/git/execution_environment.go7
-rw-r--r--internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go5
-rw-r--r--internal/testhelper/testhelper.go3
3 files changed, 15 insertions, 0 deletions
diff --git a/internal/git/execution_environment.go b/internal/git/execution_environment.go
index d140c6f44..a13f1dfad 100644
--- a/internal/git/execution_environment.go
+++ b/internal/git/execution_environment.go
@@ -26,6 +26,13 @@ var (
// case `IsEnabled()` returns `false` though.
ExecutionEnvironmentConstructors = []ExecutionEnvironmentConstructor{
BundledGitEnvironmentConstructor{
+ Suffix: "-v2.35.1.gl1",
+ FeatureFlags: []featureflag.FeatureFlag{
+ featureflag.UseBundledGit,
+ featureflag.GitV2351WithFetchSpeedups,
+ },
+ },
+ BundledGitEnvironmentConstructor{
// This is the current default bundled Git environment, which does not yet
// have a version suffix.
Suffix: "",
diff --git a/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go b/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go
new file mode 100644
index 000000000..3c3610b9e
--- /dev/null
+++ b/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go
@@ -0,0 +1,5 @@
+package featureflag
+
+// GitV2351WithFetchSpeedups will enable the use of Git v2.35.1 with patches speeding up mirror
+// fetches in repositories with many references.
+var GitV2351WithFetchSpeedups = NewFeatureFlag("git_v2351_with_fetch_speedups", false)
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index a9d51ef98..496404cba 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -180,6 +180,9 @@ func ContextWithoutCancel(opts ...ContextOpt) context.Context {
// and thus it's not feasible to inject the feature flag everywhere. Instead, we just use
// one of both randomly.
ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.UseBundledGit, mrand.Int()%2 == 0)
+ // Same as with the preceding feature flag, this flag is checked whenever we execute a Git
+ // command.
+ ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV2351WithFetchSpeedups, mrand.Int()%2 == 0)
for _, opt := range opts {
ctx = opt(ctx)