From: Junio C Hamano <gitster@pobox.com>
To: Toon Claes <toon@iotcl.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH 1/2] help: include git-zlib.h to print zlib version
Date: Fri, 07 Mar 2025 12:25:26 -0800 [thread overview]
Message-ID: <xmqqbjucegg9.fsf@gitster.g> (raw)
In-Reply-To: <20250307-toon-zlib-git-version-v1-1-5e8069752bb9@iotcl.com> (Toon Claes's message of "Fri, 07 Mar 2025 15:18:07 +0100")
Toon Claes <toon@iotcl.com> writes:
> 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(+)
OK, the user was merely "#ifdef ZLIB_VERSION", so this new inclusion
would not introduce a separate unintended breakage, I would think.
Makes sense.
Will queue.
> 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"
next prev parent reply other threads:[~2025-03-07 20:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 14:18 [PATCH 0/2] Ensure zlib version is printed by git-version(1) Toon Claes
2025-03-07 14:18 ` [PATCH 1/2] help: include git-zlib.h to print zlib version Toon Claes
2025-03-07 20:25 ` Junio C Hamano [this message]
2025-03-07 14:18 ` [PATCH 2/2] help: print zlib-ng version number Toon Claes
2025-03-07 14:20 ` [PATCH 0/2] Ensure zlib version is printed by git-version(1) Patrick Steinhardt
2025-03-07 20:25 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbjucegg9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=toon@iotcl.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).