Skip to content

Commit 56d5c67

Browse files
committed
git: force-fully ignore the environment variable GIT_VERSION
While it used to be possible to override the version shown in `git version` via `make GIT_VERSION=...`, the same was not true of the environment variable `GIT_VERSION`. However, that changed in Git's 992bc5618f2 (GIT-VERSION-GEN: fix overriding GIT_VERSION, 2024-12-20). To force the build process to derive the version shown in the output of `git version`, let's forcefully un-set the environment variable during the build. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent ef444b8 commit 56d5c67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mingw-w64-git/PKGBUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ build() {
164164
CPPFLAGS="$(echo "$CPPFLAGS" |
165165
sed 's/-D__USE_MINGW_ANSI_STDIO\(=[0-9]*\)\?//')"
166166

167+
# Guarantee that `GIT-VERSION-GEN` determines the version
168+
unset GIT_VERSION
169+
167170
# Make git-bash.exe first, to avoid triggering `* new link flags`
168171
rm -f *.res &&
169172
make -f ../mingw-w64-git.mak git-wrapper.exe \

0 commit comments

Comments
 (0)