]> git.ipfire.org Git - thirdparty/git.git/commitdiff
help: include git-zlib.h to print zlib version
authorToon Claes <toon@iotcl.com>
Fri, 7 Mar 2025 14:18:07 +0000 (15:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Mar 2025 20:23:29 +0000 (12:23 -0800)
In 41f1a8435a (git-compat-util: move include of "compat/zlib.h" into
"git-zlib.h", 2025-01-28) some code was refactored to enable easier
linking against zlib-ng.

This removed `zlib.h` being indirectly included in `help.c`. As this
file uses `ZLIB_VERSION` to print the version number of zlib when
running git-version(1) with `--build-options`, this resulted in a
regression.

Include `git-zlib.h` directly into `help.c` to print zlib version
information. This brings back the zlib version in the output of
`git version --build-options`.

Signed-off-by: Toon Claes <toon@iotcl.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c

diff --git a/help.c b/help.c
index 5483ea8fd293fc9c072f4be33ec0e5778a3020d4..d3d3adcc5c16c164348df1e4b70f5cbc60016d9b 100644 (file)
--- a/help.c
+++ b/help.c
@@ -2,6 +2,7 @@
 #define DISABLE_SIGN_COMPARE_WARNINGS
 
 #include "git-compat-util.h"
+#include "git-zlib.h"
 #include "config.h"
 #include "builtin.h"
 #include "exec-cmd.h"