Re: [PATCH v2 2/2] Teach git version --build-options about zlib versions.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 24, 2024, 14:15 UTC
- Message-ID
- <80112f79-f2ec-28ff-3ced-9df9d7ea87f0@gmx.de>
- In-Reply-To
- <20240621180947.64419-3-randall.becker@nexbridge.ca>
Hi Randall,
On Fri, 21 Jun 2024, Randall S. Becker wrote:
Show 20 quoted lines
> This change uses the zlib ZLIB_VERSION #define text macro. No > stringification is required for the variable's use. If the #define > is not present, that version is not reported. > > Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> > --- > help.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/help.c b/help.c > index bf74e935b9..f378750af4 100644 > --- a/help.c > +++ b/help.c > @@ -760,6 +760,9 @@ void get_version_info(struct strbuf *buf, int show_build_options) > strbuf_addstr(buf, "feature: fsmonitor--daemon\n"); > #if defined LIBCURL_VERSION > strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION); > +#endif > +#if defined ZLIB_VERSION > + strbuf_addf(buf, "zlib: %s\n", ZLIB_VERSION);
This reports what zlib version Git was linked against, at compile time. That may be misleading e.g. when running with a different version that has a bug. Would `zlibVersion()` be more useful here?
Ciao, Johannes
Show 8 quoted lines
> #endif > } > } > -- > 2.43.0 > > >