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:
authorJohn Cai <jcai@gitlab.com>2022-03-31 23:48:58 +0300
committerJohn Cai <jcai@gitlab.com>2022-03-31 23:48:58 +0300
commit473c264171ef06fbde4e69c97a4dbe6b4b3b7cf1 (patch)
tree1766755af228c59227fa1ca4844647f8f602c0d1
parente424af9884ed428574bd7e0f1e4764b913d9197a (diff)
parentcc72b4a4aa74fea71662d2940a6da704affcc7ad (diff)
Merge branch 'pks-git-v2.35.1.gl1-default' into 'master'
git: Make Git v2.35.1.gl1 the default Git distribution Closes #4087 See merge request gitlab-org/gitaly!4454
-rw-r--r--Makefile113
-rw-r--r--_support/git-patches/v2.33.1.gl3/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch (renamed from _support/git-patches/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0002-revision-separate-walk-and-unsorted-flags.patch (renamed from _support/git-patches/0002-revision-separate-walk-and-unsorted-flags.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0003-connected-do-not-sort-input-revisions.patch (renamed from _support/git-patches/0003-connected-do-not-sort-input-revisions.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0004-revision-stop-retrieving-reference-twice.patch (renamed from _support/git-patches/0004-revision-stop-retrieving-reference-twice.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0005-commit-graph-split-out-function-to-search-commit-pos.patch (renamed from _support/git-patches/0005-commit-graph-split-out-function-to-search-commit-pos.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch (renamed from _support/git-patches/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0007-fetch-skip-formatting-updated-refs-with-quiet.patch (renamed from _support/git-patches/0007-fetch-skip-formatting-updated-refs-with-quiet.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch (renamed from _support/git-patches/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch (renamed from _support/git-patches/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0010-connected-refactor-iterator-to-return-next-object-ID.patch (renamed from _support/git-patches/0010-connected-refactor-iterator-to-return-next-object-ID.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch (renamed from _support/git-patches/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch (renamed from _support/git-patches/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0013-fetch-merge-fetching-and-consuming-refs.patch (renamed from _support/git-patches/0013-fetch-merge-fetching-and-consuming-refs.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch (renamed from _support/git-patches/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0016-pkt-line-add-stdio-packet-write-functions.patch (renamed from _support/git-patches/0016-pkt-line-add-stdio-packet-write-functions.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch (renamed from _support/git-patches/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0018-upload-pack.c-increase-output-buffer-size.patch (renamed from _support/git-patches/0018-upload-pack.c-increase-output-buffer-size.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch (renamed from _support/git-patches/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch)0
-rw-r--r--_support/git-patches/v2.33.1.gl3/0020-fetch-skip-computing-output-width-when-not-printing-.patch (renamed from _support/git-patches/0020-fetch-skip-computing-output-width-when-not-printing-.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch92
-rw-r--r--_support/git-patches/v2.35.1.gl1/0020-fetch-skip-computing-output-width-when-not-printing-.patch84
-rw-r--r--_support/git-patches/v2.35.1.gl1/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch (renamed from _support/git-patches/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0022-refs-allow-passing-flags-when-beginning-transactions.patch (renamed from _support/git-patches/0022-refs-allow-passing-flags-when-beginning-transactions.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0023-refs-allow-skipping-the-reference-transaction-hook.patch (renamed from _support/git-patches/0023-refs-allow-skipping-the-reference-transaction-hook.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch (renamed from _support/git-patches/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch (renamed from _support/git-patches/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch (renamed from _support/git-patches/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0027-fetch-prune-exit-with-error-if-pruning-fails.patch (renamed from _support/git-patches/0027-fetch-prune-exit-with-error-if-pruning-fails.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0028-fetch-increase-test-coverage-of-fetches.patch (renamed from _support/git-patches/0028-fetch-increase-test-coverage-of-fetches.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0029-fetch-backfill-tags-before-setting-upstream.patch (renamed from _support/git-patches/0029-fetch-backfill-tags-before-setting-upstream.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch (renamed from _support/git-patches/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0031-fetch-report-errors-when-backfilling-tags-fails.patch (renamed from _support/git-patches/0031-fetch-report-errors-when-backfilling-tags-fails.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0032-refs-add-interface-to-iterate-over-queued-transactio.patch (renamed from _support/git-patches/0032-refs-add-interface-to-iterate-over-queued-transactio.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch (renamed from _support/git-patches/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch (renamed from _support/git-patches/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0035-upload-pack-look-up-want-lines-via-commit-graph.patch (renamed from _support/git-patches/0035-upload-pack-look-up-want-lines-via-commit-graph.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch (renamed from _support/git-patches/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0037-refs-add-ability-for-backends-to-special-case-readin.patch (renamed from _support/git-patches/0037-refs-add-ability-for-backends-to-special-case-readin.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch (renamed from _support/git-patches/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch)0
-rw-r--r--_support/git-patches/v2.35.1.gl1/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch (renamed from _support/git-patches/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch)0
-rw-r--r--internal/git/command_factory_test.go3
-rw-r--r--internal/git/execution_environment.go8
-rw-r--r--internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go5
-rw-r--r--internal/testhelper/testhelper.go4
45 files changed, 189 insertions, 120 deletions
diff --git a/Makefile b/Makefile
index a82e2f9db..ed907a860 100644
--- a/Makefile
+++ b/Makefile
@@ -120,55 +120,7 @@ GIT_EXECUTABLES += git-http-backend
# The default version is used in case the caller does not set the variable or
# if it is either set to the empty string or "default".
ifeq (${GIT_VERSION:default=},)
- override GIT_VERSION := v2.33.1
-
- # Before adding custom patches, please read doc/PROCESS.md#Patching-git
- # first to make sure your patches meet our acceptance criteria. Patches
- # must be put into `_support/git-patches`.
-
- # The following set of patches speeds up connectivity checks and thus
- # pushes into Gitaly. They have been merged into next via a5619d4f8d (Merge
- # branch 'ps/connectivity-optim', 2021-09-03)
- GIT_PATCHES += 0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch
- GIT_PATCHES += 0002-revision-separate-walk-and-unsorted-flags.patch
- GIT_PATCHES += 0003-connected-do-not-sort-input-revisions.patch
- GIT_PATCHES += 0004-revision-stop-retrieving-reference-twice.patch
- GIT_PATCHES += 0005-commit-graph-split-out-function-to-search-commit-pos.patch
- GIT_PATCHES += 0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch
-
- # Due to a bug, fetches with `--quiet` were slower than those without
- # because Git formatted each reference into the output buffer even though
- # it wasn't used. This has been merged into next via 2440a8a2aa (Merge
- # branch 'ps/fetch-omit-formatting-under-quiet' into next, 2021-09-01)
- GIT_PATCHES += 0007-fetch-skip-formatting-updated-refs-with-quiet.patch
-
- # This patch set speeds up fetches, most importantly by making better use
- # of the commit graph. They have been merged into next via 99f865125d
- # (Merge branch 'ps/fetch-optim' into next, 2021-09-08).
- GIT_PATCHES += 0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch
- GIT_PATCHES += 0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch
- GIT_PATCHES += 0010-connected-refactor-iterator-to-return-next-object-ID.patch
- GIT_PATCHES += 0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch
- GIT_PATCHES += 0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch
- GIT_PATCHES += 0013-fetch-merge-fetching-and-consuming-refs.patch
- GIT_PATCHES += 0014-fetch-avoid-second-connectivity-check-if-we-already-.patch
-
- # Buffer ref advertisement writes in upload-pack. Merged into next via
- # c31d871c (Merge branch 'jv/pkt-line-batch' into next, 2021-09-10).
- GIT_PATCHES += 0016-pkt-line-add-stdio-packet-write-functions.patch
- GIT_PATCHES += 0017-upload-pack-use-stdio-in-send_ref-callbacks.patch
-
- # Increase upload-pack copy buffer size. Merged into next via 3a1afc1ef8
- # (Merge branch 'jv/use-larger-buffer-in-upload-pack' into next,
- # 2021-12-27).
- GIT_PATCHES += 0018-upload-pack.c-increase-output-buffer-size.patch
-
- # Speed up fetches by making better use of the commit-graph and by not
- # computing the output-width if not requested. Merged into next via
- # 2b331293fb (Merge branch 'ps/fetch-optim-with-commit-graph' into next,
- # 2022-02-14).
- GIT_PATCHES += 0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
- GIT_PATCHES += 0020-fetch-skip-computing-output-width-when-not-printing-.patch
+ override GIT_VERSION := v2.35.1
# This extra version has two intentions: first, it allows us to detect
# capabilities of the command at runtime. Second, it helps admins to
@@ -176,7 +128,12 @@ ifeq (${GIT_VERSION:default=},)
# incremented whenever a new patch is added above. When no patches exist,
# then this should be undefined. Otherwise, it must be set to at least
# `gl1` given that `0` is the "default" GitLab patch level.
- GIT_EXTRA_VERSION := gl3
+ GIT_EXTRA_VERSION := gl1
+
+ # Before adding custom patches, please read doc/PROCESS.md#Patching-git
+ # first to make sure your patches meet our acceptance criteria. Patches
+ # must be put into `_support/git-patches`.
+ GIT_PATCHES := $(wildcard ${SOURCE_DIR}/_support/git-patches/v2.35.1.gl1/*)
else
# Support both vX.Y.Z and X.Y.Z version patterns, since callers across GitLab
# use both.
@@ -590,7 +547,7 @@ ${DEPENDENCY_DIR}/git-%/Makefile: ${DEPENDENCY_DIR}/git-%.version
${Q}${GIT} -C "${@D}" fetch --depth 1 ${GIT_QUIET} origin ${GIT_VERSION}
${Q}${GIT} -C "${@D}" reset --hard
${Q}${GIT} -C "${@D}" checkout ${GIT_QUIET} --detach FETCH_HEAD
- ${Q}if test -n "${GIT_PATCHES}"; then ${GIT} -C "${@D}" apply $(addprefix "${SOURCE_DIR}"/_support/git-patches/,${GIT_PATCHES}); fi
+ ${Q}if test -n "${GIT_PATCHES}"; then ${GIT} -C "${@D}" apply ${GIT_PATCHES}; fi
@ # We're writing the version into the "version" file in Git's own source
@ # directory. If it exists, Git's Makefile will pick it up and use it as
@ # the version instead of auto-detecting via git-describe(1).
@@ -611,57 +568,13 @@ ${GIT_PREFIX}/bin/git: ${DEPENDENCY_DIR}/git-${GIT_VERSION}.${GIT_EXTRA_VERSION}
${Q}env -u PROFILE -u MAKEFLAGS -u GIT_VERSION ${MAKE} -C "$(<D)" -j$(shell nproc) prefix=${GIT_PREFIX} ${GIT_BUILD_OPTIONS} install
${Q}touch $@
-${BUILD_DIR}/bin/gitaly-%: ${DEPENDENCY_DIR}/git-${GIT_VERSION}.${GIT_EXTRA_VERSION}/% | ${BUILD_DIR}/bin
+${BUILD_DIR}/bin/gitaly-%: override GIT_PATCHES := $(wildcard ${SOURCE_DIR}/_support/git-patches/v2.33.1.gl3/*)
+${BUILD_DIR}/bin/gitaly-%: override GIT_VERSION = v2.33.1
+${BUILD_DIR}/bin/gitaly-%: override GIT_EXTRA_VERSION = gl3
+${BUILD_DIR}/bin/gitaly-%: ${DEPENDENCY_DIR}/git-v2.33.1.gl3/% | ${BUILD_DIR}/bin
${Q}install $< $@
-# Speed up fetches by making better use of the commit-graph and by not
-# computing the output-width if not requested. Merged into next via
-# 2b331293fb (Merge branch 'ps/fetch-optim-with-commit-graph' into next,
-# 2022-02-14).
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES := 0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0020-fetch-skip-computing-output-width-when-not-printing-.patch
-
-# Skip execution of the reference-transaction hook a second time via the
-# packed-refs backend in case loose references are deleted. This will
-# eventually make a workaround obsolete where we had to filter out all
-# invocations of the hook where we only saw force-deletions of references such
-# that we don't depend on whether refs are packed or not. Merged into main via
-# 991b4d47f0 (Merge branch
-# 'ps/avoid-unnecessary-hook-invocation-with-packed-refs', 2022-02-18).
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0022-refs-allow-passing-flags-when-beginning-transactions.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0023-refs-allow-skipping-the-reference-transaction-hook.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0024-refs-demonstrate-excessive-execution-of-the-referenc.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch
-
-# Fix atomicity of git-fetch(1) to also cover pruning of references and
-# backfilling of tags. Previously, each reference modified via any of both
-# means would have created its own transaction and thus led to multiple hook
-# invocations. Merged into next via 3824153b23 (Merge branch 'ps/fetch-atomic'
-# into next, 2022-02-18). The first patch is unrelated, but required to fix a
-# merge conflict. It has been merged to main via c73d46b3a8 (Merge branch
-# 'tg/fetch-prune-exit-code-fix', 2022-02-11).
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0027-fetch-prune-exit-with-error-if-pruning-fails.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0028-fetch-increase-test-coverage-of-fetches.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0029-fetch-backfill-tags-before-setting-upstream.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0031-fetch-report-errors-when-backfilling-tags-fails.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0032-refs-add-interface-to-iterate-over-queued-transactio.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch
-
-# Some more optimizations to git-fetch(1). Most importantly, these patches
-# cause us to skip reading the packed-refs file to find symbolic references,
-# which provides a 13% speedup in benchmarks. These patches have been merged
-# into `next` via 60aae8731c (Merge branch 'ps/fetch-mirror-optim' into next,
-# 2022-03-08).
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0035-upload-pack-look-up-want-lines-via-commit-graph.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0037-refs-add-ability-for-backends-to-special-case-readin.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch
-${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES += 0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch
-
+${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_PATCHES := $(wildcard ${SOURCE_DIR}/_support/git-patches/v2.35.1.gl1/*)
${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_VERSION = v2.35.1
${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: override GIT_EXTRA_VERSION = gl1
${BUILD_DIR}/bin/gitaly-%-v2.35.1.gl1: ${DEPENDENCY_DIR}/git-v2.35.1.gl1/% | ${BUILD_DIR}/bin
diff --git a/_support/git-patches/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch b/_support/git-patches/v2.33.1.gl3/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch
index 23d0d6a33..23d0d6a33 100644
--- a/_support/git-patches/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch
+++ b/_support/git-patches/v2.33.1.gl3/0001-fetch-pack-speed-up-loading-of-refs-via-commit-graph.patch
diff --git a/_support/git-patches/0002-revision-separate-walk-and-unsorted-flags.patch b/_support/git-patches/v2.33.1.gl3/0002-revision-separate-walk-and-unsorted-flags.patch
index 3cf006650..3cf006650 100644
--- a/_support/git-patches/0002-revision-separate-walk-and-unsorted-flags.patch
+++ b/_support/git-patches/v2.33.1.gl3/0002-revision-separate-walk-and-unsorted-flags.patch
diff --git a/_support/git-patches/0003-connected-do-not-sort-input-revisions.patch b/_support/git-patches/v2.33.1.gl3/0003-connected-do-not-sort-input-revisions.patch
index 6f4f9d477..6f4f9d477 100644
--- a/_support/git-patches/0003-connected-do-not-sort-input-revisions.patch
+++ b/_support/git-patches/v2.33.1.gl3/0003-connected-do-not-sort-input-revisions.patch
diff --git a/_support/git-patches/0004-revision-stop-retrieving-reference-twice.patch b/_support/git-patches/v2.33.1.gl3/0004-revision-stop-retrieving-reference-twice.patch
index aa00f75f1..aa00f75f1 100644
--- a/_support/git-patches/0004-revision-stop-retrieving-reference-twice.patch
+++ b/_support/git-patches/v2.33.1.gl3/0004-revision-stop-retrieving-reference-twice.patch
diff --git a/_support/git-patches/0005-commit-graph-split-out-function-to-search-commit-pos.patch b/_support/git-patches/v2.33.1.gl3/0005-commit-graph-split-out-function-to-search-commit-pos.patch
index 0964f5b98..0964f5b98 100644
--- a/_support/git-patches/0005-commit-graph-split-out-function-to-search-commit-pos.patch
+++ b/_support/git-patches/v2.33.1.gl3/0005-commit-graph-split-out-function-to-search-commit-pos.patch
diff --git a/_support/git-patches/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch b/_support/git-patches/v2.33.1.gl3/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch
index c7e575811..c7e575811 100644
--- a/_support/git-patches/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch
+++ b/_support/git-patches/v2.33.1.gl3/0006-revision-avoid-hitting-packfiles-when-commits-are-in.patch
diff --git a/_support/git-patches/0007-fetch-skip-formatting-updated-refs-with-quiet.patch b/_support/git-patches/v2.33.1.gl3/0007-fetch-skip-formatting-updated-refs-with-quiet.patch
index 04c7f382a..04c7f382a 100644
--- a/_support/git-patches/0007-fetch-skip-formatting-updated-refs-with-quiet.patch
+++ b/_support/git-patches/v2.33.1.gl3/0007-fetch-skip-formatting-updated-refs-with-quiet.patch
diff --git a/_support/git-patches/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch b/_support/git-patches/v2.33.1.gl3/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch
index 2b8505d6e..2b8505d6e 100644
--- a/_support/git-patches/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch
+++ b/_support/git-patches/v2.33.1.gl3/0008-fetch-speed-up-lookup-of-want-refs-via-commit-graph.patch
diff --git a/_support/git-patches/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch b/_support/git-patches/v2.33.1.gl3/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch
index 2d35aaebd..2d35aaebd 100644
--- a/_support/git-patches/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch
+++ b/_support/git-patches/v2.33.1.gl3/0009-fetch-avoid-unpacking-headers-in-object-existence-ch.patch
diff --git a/_support/git-patches/0010-connected-refactor-iterator-to-return-next-object-ID.patch b/_support/git-patches/v2.33.1.gl3/0010-connected-refactor-iterator-to-return-next-object-ID.patch
index 872b92784..872b92784 100644
--- a/_support/git-patches/0010-connected-refactor-iterator-to-return-next-object-ID.patch
+++ b/_support/git-patches/v2.33.1.gl3/0010-connected-refactor-iterator-to-return-next-object-ID.patch
diff --git a/_support/git-patches/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch b/_support/git-patches/v2.33.1.gl3/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch
index f0b9af0c1..f0b9af0c1 100644
--- a/_support/git-patches/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch
+++ b/_support/git-patches/v2.33.1.gl3/0011-fetch-pack-optimize-loading-of-refs-via-commit-graph.patch
diff --git a/_support/git-patches/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch b/_support/git-patches/v2.33.1.gl3/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch
index e2ef70836..e2ef70836 100644
--- a/_support/git-patches/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch
+++ b/_support/git-patches/v2.33.1.gl3/0012-fetch-refactor-fetch-refs-to-be-more-extendable.patch
diff --git a/_support/git-patches/0013-fetch-merge-fetching-and-consuming-refs.patch b/_support/git-patches/v2.33.1.gl3/0013-fetch-merge-fetching-and-consuming-refs.patch
index ba792717c..ba792717c 100644
--- a/_support/git-patches/0013-fetch-merge-fetching-and-consuming-refs.patch
+++ b/_support/git-patches/v2.33.1.gl3/0013-fetch-merge-fetching-and-consuming-refs.patch
diff --git a/_support/git-patches/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch b/_support/git-patches/v2.33.1.gl3/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch
index 89a16dfa0..89a16dfa0 100644
--- a/_support/git-patches/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch
+++ b/_support/git-patches/v2.33.1.gl3/0014-fetch-avoid-second-connectivity-check-if-we-already-.patch
diff --git a/_support/git-patches/0016-pkt-line-add-stdio-packet-write-functions.patch b/_support/git-patches/v2.33.1.gl3/0016-pkt-line-add-stdio-packet-write-functions.patch
index ea4e221f3..ea4e221f3 100644
--- a/_support/git-patches/0016-pkt-line-add-stdio-packet-write-functions.patch
+++ b/_support/git-patches/v2.33.1.gl3/0016-pkt-line-add-stdio-packet-write-functions.patch
diff --git a/_support/git-patches/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch b/_support/git-patches/v2.33.1.gl3/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch
index 83db05f80..83db05f80 100644
--- a/_support/git-patches/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch
+++ b/_support/git-patches/v2.33.1.gl3/0017-upload-pack-use-stdio-in-send_ref-callbacks.patch
diff --git a/_support/git-patches/0018-upload-pack.c-increase-output-buffer-size.patch b/_support/git-patches/v2.33.1.gl3/0018-upload-pack.c-increase-output-buffer-size.patch
index 6adb09deb..6adb09deb 100644
--- a/_support/git-patches/0018-upload-pack.c-increase-output-buffer-size.patch
+++ b/_support/git-patches/v2.33.1.gl3/0018-upload-pack.c-increase-output-buffer-size.patch
diff --git a/_support/git-patches/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch b/_support/git-patches/v2.33.1.gl3/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
index 855bcc193..855bcc193 100644
--- a/_support/git-patches/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
+++ b/_support/git-patches/v2.33.1.gl3/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
diff --git a/_support/git-patches/0020-fetch-skip-computing-output-width-when-not-printing-.patch b/_support/git-patches/v2.33.1.gl3/0020-fetch-skip-computing-output-width-when-not-printing-.patch
index 2ef3c109a..2ef3c109a 100644
--- a/_support/git-patches/0020-fetch-skip-computing-output-width-when-not-printing-.patch
+++ b/_support/git-patches/v2.33.1.gl3/0020-fetch-skip-computing-output-width-when-not-printing-.patch
diff --git a/_support/git-patches/v2.35.1.gl1/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch b/_support/git-patches/v2.35.1.gl1/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
new file mode 100644
index 000000000..855bcc193
--- /dev/null
+++ b/_support/git-patches/v2.35.1.gl1/0019-fetch-pack-use-commit-graph-when-computing-cutoff.patch
@@ -0,0 +1,92 @@
+From 6fd1cc8f985ccd8b014e945a819482b267dae21f Mon Sep 17 00:00:00 2001
+Message-Id: <6fd1cc8f985ccd8b014e945a819482b267dae21f.1645001444.git.ps@pks.im>
+From: Patrick Steinhardt <ps@pks.im>
+Date: Thu, 10 Feb 2022 13:28:09 +0100
+Subject: [PATCH 1/2] fetch-pack: use commit-graph when computing cutoff
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+During packfile negotiation we iterate over all refs announced by the
+remote side to check whether their IDs refer to commits already known to
+us. If a commit is known to us already, then its date is a potential
+cutoff point for commits we have in common with the remote side.
+
+There is potentially a lot of commits announced by the remote depending
+on how many refs there are in the remote repository, and for every one
+of them we need to search for it in our object database and, if found,
+parse the corresponding object to find out whether it is a candidate for
+the cutoff date. This can be sped up by trying to look up commits via
+the commit-graph first, which is a lot more efficient.
+
+Benchmarks in a repository with about 2,1 million refs and an up-to-date
+commit-graph show an almost 20% speedup when mirror-fetching:
+
+ Benchmark 1: git fetch +refs/*:refs/* (v2.35.0)
+ Time (mean ± σ): 115.587 s ± 2.009 s [User: 109.874 s, System: 11.305 s]
+ Range (min … max): 113.584 s … 118.820 s 5 runs
+
+ Benchmark 2: git fetch +refs/*:refs/* (HEAD)
+ Time (mean ± σ): 96.859 s ± 0.624 s [User: 91.948 s, System: 10.980 s]
+ Range (min … max): 96.180 s … 97.875 s 5 runs
+
+ Summary
+ 'git fetch +refs/*:refs/* (HEAD)' ran
+ 1.19 ± 0.02 times faster than 'git fetch +refs/*:refs/* (v2.35.0)'
+
+Signed-off-by: Patrick Steinhardt <ps@pks.im>
+Signed-off-by: Junio C Hamano <gitster@pobox.com>
+---
+ fetch-pack.c | 28 ++++++++++++++++------------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/fetch-pack.c b/fetch-pack.c
+index dd6ec449f2..c5967e228e 100644
+--- a/fetch-pack.c
++++ b/fetch-pack.c
+@@ -696,26 +696,30 @@ static void mark_complete_and_common_ref(struct fetch_negotiator *negotiator,
+
+ trace2_region_enter("fetch-pack", "parse_remote_refs_and_find_cutoff", NULL);
+ for (ref = *refs; ref; ref = ref->next) {
+- struct object *o;
++ struct commit *commit;
+
+- if (!has_object_file_with_flags(&ref->old_oid,
++ commit = lookup_commit_in_graph(the_repository, &ref->old_oid);
++ if (!commit) {
++ struct object *o;
++
++ if (!has_object_file_with_flags(&ref->old_oid,
+ OBJECT_INFO_QUICK |
+- OBJECT_INFO_SKIP_FETCH_OBJECT))
+- continue;
+- o = parse_object(the_repository, &ref->old_oid);
+- if (!o)
+- continue;
++ OBJECT_INFO_SKIP_FETCH_OBJECT))
++ continue;
++ o = parse_object(the_repository, &ref->old_oid);
++ if (!o || o->type != OBJ_COMMIT)
++ continue;
++
++ commit = (struct commit *)o;
++ }
+
+ /*
+ * We already have it -- which may mean that we were
+ * in sync with the other side at some time after
+ * that (it is OK if we guess wrong here).
+ */
+- if (o->type == OBJ_COMMIT) {
+- struct commit *commit = (struct commit *)o;
+- if (!cutoff || cutoff < commit->date)
+- cutoff = commit->date;
+- }
++ if (!cutoff || cutoff < commit->date)
++ cutoff = commit->date;
+ }
+ trace2_region_leave("fetch-pack", "parse_remote_refs_and_find_cutoff", NULL);
+
+--
+2.35.1
+
diff --git a/_support/git-patches/v2.35.1.gl1/0020-fetch-skip-computing-output-width-when-not-printing-.patch b/_support/git-patches/v2.35.1.gl1/0020-fetch-skip-computing-output-width-when-not-printing-.patch
new file mode 100644
index 000000000..2ef3c109a
--- /dev/null
+++ b/_support/git-patches/v2.35.1.gl1/0020-fetch-skip-computing-output-width-when-not-printing-.patch
@@ -0,0 +1,84 @@
+From b18aaaa5e931d79d057f68ac0d7c3dd0377e5f03 Mon Sep 17 00:00:00 2001
+Message-Id: <b18aaaa5e931d79d057f68ac0d7c3dd0377e5f03.1645001444.git.ps@pks.im>
+In-Reply-To: <6fd1cc8f985ccd8b014e945a819482b267dae21f.1645001444.git.ps@pks.im>
+References: <6fd1cc8f985ccd8b014e945a819482b267dae21f.1645001444.git.ps@pks.im>
+From: Patrick Steinhardt <ps@pks.im>
+Date: Thu, 10 Feb 2022 13:28:16 +0100
+Subject: [PATCH 2/2] fetch: skip computing output width when not printing
+ anything
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When updating references via git-fetch(1), then by default we report to
+the user which references have been changed. This output is formatted in
+a nice table such that the different columns are aligned. Because the
+first column contains abbreviated object IDs we thus need to iterate
+over all refs which have changed and compute the minimum length for
+their respective abbreviated hashes. While this effort makes sense in
+most cases, it is wasteful when the user passes the `--quiet` flag: we
+don't print the summary, but still compute the length.
+
+Skip computing the summary width when the user asked for us to be quiet.
+This gives us a speedup of nearly 10% when doing a mirror-fetch in a
+repository with thousands of references being updated:
+
+ Benchmark 1: git fetch --quiet +refs/*:refs/* (HEAD~)
+ Time (mean ± σ): 96.078 s ± 0.508 s [User: 91.378 s, System: 10.870 s]
+ Range (min … max): 95.449 s … 96.760 s 5 runs
+
+ Benchmark 2: git fetch --quiet +refs/*:refs/* (HEAD)
+ Time (mean ± σ): 88.214 s ± 0.192 s [User: 83.274 s, System: 10.978 s]
+ Range (min … max): 87.998 s … 88.446 s 5 runs
+
+ Summary
+ 'git fetch --quiet +refs/*:refs/* (HEAD)' ran
+ 1.09 ± 0.01 times faster than 'git fetch --quiet +refs/*:refs/* (HEAD~)'
+
+Signed-off-by: Patrick Steinhardt <ps@pks.im>
+Signed-off-by: Junio C Hamano <gitster@pobox.com>
+---
+ builtin/fetch.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/builtin/fetch.c b/builtin/fetch.c
+index 5b3b18a72f..7ef305c66d 100644
+--- a/builtin/fetch.c
++++ b/builtin/fetch.c
+@@ -1094,12 +1094,15 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
+ struct ref *rm;
+ char *url;
+ int want_status;
+- int summary_width = transport_summary_width(ref_map);
++ int summary_width = 0;
+
+ rc = open_fetch_head(&fetch_head);
+ if (rc)
+ return -1;
+
++ if (verbosity >= 0)
++ summary_width = transport_summary_width(ref_map);
++
+ if (raw_url)
+ url = transport_anonymize_url(raw_url);
+ else
+@@ -1345,7 +1348,6 @@ static int prune_refs(struct refspec *rs, struct ref *ref_map,
+ int url_len, i, result = 0;
+ struct ref *ref, *stale_refs = get_stale_heads(rs, ref_map);
+ char *url;
+- int summary_width = transport_summary_width(stale_refs);
+ const char *dangling_msg = dry_run
+ ? _(" (%s will become dangling)")
+ : _(" (%s has become dangling)");
+@@ -1374,6 +1376,8 @@ static int prune_refs(struct refspec *rs, struct ref *ref_map,
+ }
+
+ if (verbosity >= 0) {
++ int summary_width = transport_summary_width(stale_refs);
++
+ for (ref = stale_refs; ref; ref = ref->next) {
+ struct strbuf sb = STRBUF_INIT;
+ if (!shown_url) {
+--
+2.35.1
+
diff --git a/_support/git-patches/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch b/_support/git-patches/v2.35.1.gl1/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch
index 47dd3e41c..47dd3e41c 100644
--- a/_support/git-patches/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch
+++ b/_support/git-patches/v2.35.1.gl1/0021-refs-extract-packed_refs_delete_refs-to-allow-contro.patch
diff --git a/_support/git-patches/0022-refs-allow-passing-flags-when-beginning-transactions.patch b/_support/git-patches/v2.35.1.gl1/0022-refs-allow-passing-flags-when-beginning-transactions.patch
index 8038daca2..8038daca2 100644
--- a/_support/git-patches/0022-refs-allow-passing-flags-when-beginning-transactions.patch
+++ b/_support/git-patches/v2.35.1.gl1/0022-refs-allow-passing-flags-when-beginning-transactions.patch
diff --git a/_support/git-patches/0023-refs-allow-skipping-the-reference-transaction-hook.patch b/_support/git-patches/v2.35.1.gl1/0023-refs-allow-skipping-the-reference-transaction-hook.patch
index cd194f8aa..cd194f8aa 100644
--- a/_support/git-patches/0023-refs-allow-skipping-the-reference-transaction-hook.patch
+++ b/_support/git-patches/v2.35.1.gl1/0023-refs-allow-skipping-the-reference-transaction-hook.patch
diff --git a/_support/git-patches/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch b/_support/git-patches/v2.35.1.gl1/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch
index aa6d96a3e..aa6d96a3e 100644
--- a/_support/git-patches/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch
+++ b/_support/git-patches/v2.35.1.gl1/0024-refs-demonstrate-excessive-execution-of-the-referenc.patch
diff --git a/_support/git-patches/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch b/_support/git-patches/v2.35.1.gl1/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch
index f2e7c06ed..f2e7c06ed 100644
--- a/_support/git-patches/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch
+++ b/_support/git-patches/v2.35.1.gl1/0025-refs-do-not-execute-reference-transaction-hook-on-pa.patch
diff --git a/_support/git-patches/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch b/_support/git-patches/v2.35.1.gl1/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch
index 3b21bf489..3b21bf489 100644
--- a/_support/git-patches/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch
+++ b/_support/git-patches/v2.35.1.gl1/0026-refs-skip-hooks-when-deleting-uncovered-packed-refs.patch
diff --git a/_support/git-patches/0027-fetch-prune-exit-with-error-if-pruning-fails.patch b/_support/git-patches/v2.35.1.gl1/0027-fetch-prune-exit-with-error-if-pruning-fails.patch
index a6a75c054..a6a75c054 100644
--- a/_support/git-patches/0027-fetch-prune-exit-with-error-if-pruning-fails.patch
+++ b/_support/git-patches/v2.35.1.gl1/0027-fetch-prune-exit-with-error-if-pruning-fails.patch
diff --git a/_support/git-patches/0028-fetch-increase-test-coverage-of-fetches.patch b/_support/git-patches/v2.35.1.gl1/0028-fetch-increase-test-coverage-of-fetches.patch
index 412a908ef..412a908ef 100644
--- a/_support/git-patches/0028-fetch-increase-test-coverage-of-fetches.patch
+++ b/_support/git-patches/v2.35.1.gl1/0028-fetch-increase-test-coverage-of-fetches.patch
diff --git a/_support/git-patches/0029-fetch-backfill-tags-before-setting-upstream.patch b/_support/git-patches/v2.35.1.gl1/0029-fetch-backfill-tags-before-setting-upstream.patch
index 360bd10c2..360bd10c2 100644
--- a/_support/git-patches/0029-fetch-backfill-tags-before-setting-upstream.patch
+++ b/_support/git-patches/v2.35.1.gl1/0029-fetch-backfill-tags-before-setting-upstream.patch
diff --git a/_support/git-patches/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch b/_support/git-patches/v2.35.1.gl1/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch
index dc9d1364a..dc9d1364a 100644
--- a/_support/git-patches/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch
+++ b/_support/git-patches/v2.35.1.gl1/0030-fetch-control-lifecycle-of-FETCH_HEAD-in-a-single-pl.patch
diff --git a/_support/git-patches/0031-fetch-report-errors-when-backfilling-tags-fails.patch b/_support/git-patches/v2.35.1.gl1/0031-fetch-report-errors-when-backfilling-tags-fails.patch
index a2cfd7b3e..a2cfd7b3e 100644
--- a/_support/git-patches/0031-fetch-report-errors-when-backfilling-tags-fails.patch
+++ b/_support/git-patches/v2.35.1.gl1/0031-fetch-report-errors-when-backfilling-tags-fails.patch
diff --git a/_support/git-patches/0032-refs-add-interface-to-iterate-over-queued-transactio.patch b/_support/git-patches/v2.35.1.gl1/0032-refs-add-interface-to-iterate-over-queued-transactio.patch
index cc6a3e320..cc6a3e320 100644
--- a/_support/git-patches/0032-refs-add-interface-to-iterate-over-queued-transactio.patch
+++ b/_support/git-patches/v2.35.1.gl1/0032-refs-add-interface-to-iterate-over-queued-transactio.patch
diff --git a/_support/git-patches/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch b/_support/git-patches/v2.35.1.gl1/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch
index 9e136f838..9e136f838 100644
--- a/_support/git-patches/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch
+++ b/_support/git-patches/v2.35.1.gl1/0033-fetch-make-atomic-flag-cover-backfilling-of-tags.patch
diff --git a/_support/git-patches/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch b/_support/git-patches/v2.35.1.gl1/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch
index e0f50a7e1..e0f50a7e1 100644
--- a/_support/git-patches/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch
+++ b/_support/git-patches/v2.35.1.gl1/0034-fetch-make-atomic-flag-cover-pruning-of-refs.patch
diff --git a/_support/git-patches/0035-upload-pack-look-up-want-lines-via-commit-graph.patch b/_support/git-patches/v2.35.1.gl1/0035-upload-pack-look-up-want-lines-via-commit-graph.patch
index c8ada5b44..c8ada5b44 100644
--- a/_support/git-patches/0035-upload-pack-look-up-want-lines-via-commit-graph.patch
+++ b/_support/git-patches/v2.35.1.gl1/0035-upload-pack-look-up-want-lines-via-commit-graph.patch
diff --git a/_support/git-patches/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch b/_support/git-patches/v2.35.1.gl1/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch
index 686dfde8e..686dfde8e 100644
--- a/_support/git-patches/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch
+++ b/_support/git-patches/v2.35.1.gl1/0036-fetch-avoid-lookup-of-commits-when-not-appending-to-.patch
diff --git a/_support/git-patches/0037-refs-add-ability-for-backends-to-special-case-readin.patch b/_support/git-patches/v2.35.1.gl1/0037-refs-add-ability-for-backends-to-special-case-readin.patch
index 695f04a1b..695f04a1b 100644
--- a/_support/git-patches/0037-refs-add-ability-for-backends-to-special-case-readin.patch
+++ b/_support/git-patches/v2.35.1.gl1/0037-refs-add-ability-for-backends-to-special-case-readin.patch
diff --git a/_support/git-patches/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch b/_support/git-patches/v2.35.1.gl1/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch
index 0ea1df7b0..0ea1df7b0 100644
--- a/_support/git-patches/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch
+++ b/_support/git-patches/v2.35.1.gl1/0038-remote-read-symbolic-refs-via-refs_read_symbolic_ref.patch
diff --git a/_support/git-patches/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch b/_support/git-patches/v2.35.1.gl1/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch
index 465257950..465257950 100644
--- a/_support/git-patches/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch
+++ b/_support/git-patches/v2.35.1.gl1/0039-refs-files-backend-optimize-reading-of-symbolic-refs.patch
diff --git a/internal/git/command_factory_test.go b/internal/git/command_factory_test.go
index 067dace1e..438e23adc 100644
--- a/internal/git/command_factory_test.go
+++ b/internal/git/command_factory_test.go
@@ -17,7 +17,6 @@ import (
"gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/v14/internal/helper/text"
- "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v14/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testcfg"
)
@@ -181,8 +180,6 @@ func TestCommandFactory_ExecutionEnvironment(t *testing.T) {
})
t.Run("set using GITALY_TESTING_BUNDLED_GIT_PATH", func(t *testing.T) {
- // Force use of Git v2.35.1 so that we can easily handle the expected suffix.
- ctx := featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV2351WithFetchSpeedups, true)
suffix := "-v2.35.1.gl1"
bundledGitDir := testhelper.TempDir(t)
diff --git a/internal/git/execution_environment.go b/internal/git/execution_environment.go
index e6e0fe363..f5aa36b53 100644
--- a/internal/git/execution_environment.go
+++ b/internal/git/execution_environment.go
@@ -27,14 +27,6 @@ var (
ExecutionEnvironmentConstructors = []ExecutionEnvironmentConstructor{
BundledGitEnvironmentConstructor{
Suffix: "-v2.35.1.gl1",
- FeatureFlags: []featureflag.FeatureFlag{
- featureflag.GitV2351WithFetchSpeedups,
- },
- },
- BundledGitEnvironmentConstructor{
- // This is the current default bundled Git environment, which does not yet
- // have a version suffix.
- Suffix: "",
},
DistributedGitEnvironmentConstructor{},
FallbackGitEnvironmentConstructor{},
diff --git a/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go b/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go
deleted file mode 100644
index b62a4253f..000000000
--- a/internal/metadata/featureflag/ff_git_v2351_with_fetch_speedups.go
+++ /dev/null
@@ -1,5 +0,0 @@
-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", true)
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index 6bf7d3839..2e780398b 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -11,7 +11,6 @@ import (
"fmt"
"io"
"math/big"
- mrand "math/rand"
"net"
"os"
"os/exec"
@@ -175,9 +174,6 @@ func ContextWithoutCancel(opts ...ContextOpt) context.Context {
// ConcurrencyQueueMaxWait is in the codepath of every RPC call since it's in the limithandler
// middleware.
ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.ConcurrencyQueueMaxWait, true)
- // This flag is checked whenever we execute a Git command, making it infeasible to inject it
- // at every callsite.
- ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV2351WithFetchSpeedups, mrand.Int()%2 == 0)
for _, opt := range opts {
ctx = opt(ctx)