diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-27 10:18:54 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-27 10:38:02 +0300 |
commit | 2bb63afb9a30d849d16f6171312c02fdd7726d08 (patch) | |
tree | 3351517298b84db9f9558911e2f223e3477b9b6b /Makefile | |
parent | 2eb1444c2d063e8d0f214cccdde83a523e3077a9 (diff) |
ci: Only apply Git patches for default version
We've grown a bunch of patches which get applied to Git such that we can
land improvements in production faster. These patches get applied by
default, and in fact they also get applied when the user specifies a
different Git version than the default one. This is quite annoying given
that the patches are unlikely to apply on an arbitrary Git version, and
it thus requires callers to always pass `GIT_PATCHES=` in order to not
apply patches when using a custom version. Furthermore, it's a tad
dangerous: if the user explicitly requests a different Git version and
doesn't override GIT_PATCHES, then we'd also amend the current extra
version to indicate the Gitaly patch level.
Fix this issue by only applying patches by default in case the default
Git version is in use. Users can still explicitly request patching by
setting GIT_APPLY_DEFAULT_PATCHES, if they want to.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -87,6 +87,7 @@ LIBGIT2_VERSION ?= v1.2.0 # if it is either set to the empty string or "default". ifeq (${GIT_VERSION:default=},) override GIT_VERSION := v2.33.1 + GIT_APPLY_DEFAULT_PATCHES := YesPlease else # Support both vX.Y.Z and X.Y.Z version patterns, since callers across GitLab # use both. @@ -111,7 +112,7 @@ ifeq (${Q},@) GIT_QUIET = --quiet endif -ifeq ($(origin GIT_PATCHES),undefined) +ifdef GIT_APPLY_DEFAULT_PATCHES # 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`. |