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:
authorWill Chandler <wchandler@gitlab.com>2023-12-19 17:59:27 +0300
committerGitLab <noreply@gitlab.com>2023-12-19 17:59:27 +0300
commit73920c7baa9ace55ba51d555e309897fd331c1b4 (patch)
tree9598c1b0bac0e86d8551d9db6c3f0c7e5ba27c8d
parentf16371d5ac5d20617380df435803f6c9c7ced564 (diff)
parentf43da6dde3725ad6b8d34fd5f9b66cc73ec1c48f (diff)
Merge branch 'toon-git243' into 'master'
git: Add bundled Git version 2.43 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6587 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
-rw-r--r--Makefile12
-rw-r--r--internal/featureflag/ff_git_v243.go9
-rw-r--r--internal/git/execution_environment.go6
-rw-r--r--internal/testhelper/testhelper.go2
4 files changed, 27 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6afd70a37..fb5a9904a 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,8 @@ GIT_EXECUTABLES += git-http-backend
GIT_VERSION ?=
## The Git version used for bundled Git v2.42.
GIT_VERSION_2_42 ?= v2.42.0
+## The Git version used for bundled Git v2.43.
+GIT_VERSION_2_43 ?= v2.43.0
## Skip overriding the Git version and instead use the Git version as specified
## in the Git sources. This is required when building Git from a version that
@@ -280,14 +282,16 @@ install: build
.PHONY: build-bundled-git
## Build bundled Git binaries.
-build-bundled-git: build-bundled-git-v2.42
+build-bundled-git: build-bundled-git-v2.42 build-bundled-git-v2.43
build-bundled-git-v2.42: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.42,${GIT_EXECUTABLES})
+build-bundled-git-v2.43: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.43,${GIT_EXECUTABLES})
.PHONY: install-bundled-git
## Install bundled Git binaries. The target directory can be modified by
## setting PREFIX and DESTDIR.
-install-bundled-git: install-bundled-git-v2.42
+install-bundled-git: install-bundled-git-v2.42 install-bundled-git-v2.43
install-bundled-git-v2.42: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.42,${GIT_EXECUTABLES})
+install-bundled-git-v2.43: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.43,${GIT_EXECUTABLES})
ifdef WITH_BUNDLED_GIT
build: build-bundled-git
@@ -534,6 +538,10 @@ ${BUILD_DIR}/bin/gitaly-%-v2.42: override GIT_VERSION = ${GIT_VERSION_2_42}
${BUILD_DIR}/bin/gitaly-%-v2.42: ${DEPENDENCY_DIR}/git-v2.42/% | ${BUILD_DIR}/bin
${Q}install $< $@
+${BUILD_DIR}/bin/gitaly-%-v2.43: override GIT_VERSION = ${GIT_VERSION_2_43}
+${BUILD_DIR}/bin/gitaly-%-v2.43: ${DEPENDENCY_DIR}/git-v2.43/% | ${BUILD_DIR}/bin
+ ${Q}install $< $@
+
${BUILD_DIR}/bin/%: ${BUILD_DIR}/intermediate/% | ${BUILD_DIR}/bin
@ # To compute a unique and deterministic value for GNU build-id, we use an
@ # intermediate binary which has a fixed build ID of "TEMP_GITALY_BUILD_ID",
diff --git a/internal/featureflag/ff_git_v243.go b/internal/featureflag/ff_git_v243.go
new file mode 100644
index 000000000..313809990
--- /dev/null
+++ b/internal/featureflag/ff_git_v243.go
@@ -0,0 +1,9 @@
+package featureflag
+
+// GitV243 enables the use of Git version 2.43.
+var GitV243 = NewFeatureFlag(
+ "git_v243",
+ "v16.7.0",
+ "https://gitlab.com/gitlab-org/gitaly/-/issues/5739",
+ false,
+)
diff --git a/internal/git/execution_environment.go b/internal/git/execution_environment.go
index 66923076f..dd9cd0844 100644
--- a/internal/git/execution_environment.go
+++ b/internal/git/execution_environment.go
@@ -25,6 +25,12 @@ var (
// case `IsEnabled()` returns `false` though.
defaultExecutionEnvironmentConstructors = []ExecutionEnvironmentConstructor{
BundledGitEnvironmentConstructor{
+ Suffix: "-v2.43",
+ FeatureFlags: []featureflag.FeatureFlag{
+ featureflag.GitV243,
+ },
+ },
+ BundledGitEnvironmentConstructor{
Suffix: "-v2.42",
},
DistributedGitEnvironmentConstructor{},
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index 67905f67e..59663b0ab 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -260,6 +260,8 @@ func ContextWithoutCancel(opts ...ContextOpt) context.Context {
ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.UseResizableSemaphoreInConcurrencyLimiter, rand.Int()%2 == 0)
// Randomly enable ExecCommandDirectlyInCgroup.
ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.ExecCommandDirectlyInCgroup, rand.Int()%2 == 0)
+ // Randomly enable newer Git version.
+ ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV243, rand.Int()%2 == 0)
for _, opt := range opts {
ctx = opt(ctx)