git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] help: include git-zlib.h to print zlib version

From
Toon Claes <toon@iotcl.com>
Date
Mar 7, 2025, 14:18 UTC
Message-ID
<20250307-toon-zlib-git-version-v1-1-5e8069752bb9@iotcl.com>
In-Reply-To
<20250307-toon-zlib-git-version-v1-0-5e8069752bb9@iotcl.com>

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>
---
 help.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/help.c b/help.c
index 8d91afe851..707cd59b79 100644
--- 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"
-- 
2.49.0.rc1.410.g72b47a15e9
Previous: Toon ClaesNext: Junio C Hamano
Message 2 of 6 in “Ensure zlib version is printed by git-version(1)”
  1. 0/2 Ensure zlib version is printed by git-version(1)Toon Claes, Mar 7, 2025
  2. 1/2 help: include git-zlib.h to print zlib versionToon Claes, Mar 7, 2025
  3. Junio C HamanoMar 7, 2025
  4. 2/2 help: print zlib-ng version numberToon Claes, Mar 7, 2025
  5. Patrick SteinhardtMar 7, 2025
  6. Junio C HamanoMar 7, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.