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

RE: [PATCH v2 2/2] Teach git version --build-options about zlib versions.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 24, 2024, 11:02 UTC
Message-ID
<0bec87dc-d852-4133-1e6d-11e9a1c5df2c@gmx.de>
In-Reply-To
<DS0PR17MB60311800BF14CC1C5C7E707FF4D42@DS0PR17MB6031.namprd17.prod.outlook.com>
Hi Randall,
On Mon, 24 Jun 2024, Randall Becker wrote:
Show 31 quoted lines
> On Monday, June 24, 2024 10:16 AM, Johannes Schindelin wrote:
> >On Fri, 21 Jun 2024, Randall S. Becker wrote:
> >
> >> 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?
>
> Please see my comments on the libcurl sub-thread. Same logic applies here.

Let's summarize the part of your comments in that sub-thread that is actually relevant here, okay? Here goes my attempt:

	The scenario of concern involved a customer having installed a Git
	build targeting the wrong library version.
Does that sound like a valid summary?

I am quite puzzled what exactly your answer is meant to tell me here, though. Is it meant to say:

- Yes, it should be `zlibVersion()`, it is the version that is used and
  that might cause troubles after all,
- No, you want to continue showing the compile-time version, even if the
  user might actually use a different version depending what is installed
  in their setup,
- Yes _and_ no: both versions need to be displayed, as a discrepancy
  there might explain reported problems and could therefore be quite
  useful when handling bug reports.

In other words: Please understand that your answer to my question left me wanting for an answer.

Ciao, Johannes

Previous: Randall BeckerNext: Randall Becker
Message 23 of 26 in “Teach git version --build-options about zlib+libcurl”
  1. 0/2 Teach git version --build-options about zlib+libcurlRandall S. Becker, Jun 21, 2024
  2. 1/2 Teach git version --build-options about libcurlRandall S. Becker, Jun 21, 2024
  3. Johannes SchindelinJun 24, 2024
  4. Randall BeckerJun 24, 2024
  5. Dragan SimicJun 24, 2024
  6. rsbecker@nexbridge.comJun 24, 2024
  7. Dragan SimicJun 24, 2024
  8. Randall BeckerJun 24, 2024
  9. Johannes SchindelinJul 24, 2024
  10. Jeff KingJun 24, 2024
  11. Junio C HamanoJun 24, 2024
  12. Jeff KingJun 24, 2024
  13. Junio C HamanoJun 25, 2024
  14. Johannes SchindelinJul 24, 2024
  15. Jeff KingJul 24, 2024
  16. Johannes SchindelinJul 24, 2024
  17. Jeff KingJul 25, 2024
  18. Junio C HamanoJul 25, 2024
  19. Jeff KingJul 26, 2024
  20. 2/2 Teach git version --build-options about zlib versions.Randall S. Becker, Jun 21, 2024
  21. Johannes SchindelinJun 24, 2024
  22. Randall BeckerJun 24, 2024
  23. Johannes SchindelinJul 24, 2024
  24. Randall BeckerJul 24, 2024
  25. Junio C HamanoJul 24, 2024
  26. rsbecker@nexbridge.comJul 24, 2024

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.