mbox series

[0/2] Ensure zlib version is printed by git-version(1)

Message ID 20250307-toon-zlib-git-version-v1-0-5e8069752bb9@iotcl.com (mailing list archive)
Headers show
Series Ensure zlib version is printed by git-version(1) | expand

Message

Toon Claes March 7, 2025, 2:18 p.m. UTC
I was trying to benchmark the difference between using zlib and zlib-ng.
To be sure I was testing the correct version, I was interested if
git-version(1) would tell which zlib library it uses. After some digging
I saw it should be printing the zlib version number, but on my machine
it wasn't.

I discovered a regression caused by 41f1a8435a (git-compat-util: move
include of "compat/zlib.h" into "git-zlib.h", 2025-01-28). In the first
commit I'm addressing that regression.

But I've noticed building against zlib-ng directly still didn't print
the zlib version. This issue is resolved in the second commit.

--
Toon

Signed-off-by: Toon Claes <toon@iotcl.com>
---
Toon Claes (2):
      help: include git-zlib.h to print zlib version
      help: print zlib-ng version number

 help.c               | 5 ++++-
 t/t0091-bugreport.sh | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---



---

base-commit: a36e024e989f4d35f35987a60e3af8022cac3420
change-id: 20250307-toon-zlib-git-version-a7dcb9caa1ef

Thanks
--
Toon

Comments

Patrick Steinhardt March 7, 2025, 2:20 p.m. UTC | #1
On Fri, Mar 07, 2025 at 03:18:06PM +0100, Toon Claes wrote:
> I was trying to benchmark the difference between using zlib and zlib-ng.
> To be sure I was testing the correct version, I was interested if
> git-version(1) would tell which zlib library it uses. After some digging
> I saw it should be printing the zlib version number, but on my machine
> it wasn't.
> 
> I discovered a regression caused by 41f1a8435a (git-compat-util: move
> include of "compat/zlib.h" into "git-zlib.h", 2025-01-28). In the first
> commit I'm addressing that regression.
> 
> But I've noticed building against zlib-ng directly still didn't print
> the zlib version. This issue is resolved in the second commit.

I've already reviewed the change internally and it looked obviously good
to me. Thanks for finding, fixing and improving this!

Patrick
Junio C Hamano March 7, 2025, 8:25 p.m. UTC | #2
Patrick Steinhardt <ps@pks.im> writes:

> On Fri, Mar 07, 2025 at 03:18:06PM +0100, Toon Claes wrote:
>> I was trying to benchmark the difference between using zlib and zlib-ng.
>> To be sure I was testing the correct version, I was interested if
>> git-version(1) would tell which zlib library it uses. After some digging
>> I saw it should be printing the zlib version number, but on my machine
>> it wasn't.
>> 
>> I discovered a regression caused by 41f1a8435a (git-compat-util: move
>> include of "compat/zlib.h" into "git-zlib.h", 2025-01-28). In the first
>> commit I'm addressing that regression.
>> 
>> But I've noticed building against zlib-ng directly still didn't print
>> the zlib version. This issue is resolved in the second commit.
>
> I've already reviewed the change internally and it looked obviously good
> to me. Thanks for finding, fixing and improving this!

Thanks, both.  The changes look quite sensible.