Subject: Re: What's cooking in git.git (Aug 2025, #02; Mon, 4)

From: Toon Claes <[email-masked]>
Date: Tue, 05 Aug 2025 15:55:25 +0200

Junio C Hamano <[email-masked]> writes:

> * jt/archive-zip-deflate-fix (2025-08-02) 1 commit
>   (merged to 'next' on 2025-08-04 at 4444b611dc)
>  + archive: flush deflate stream until Z_STREAM_END
>
>  The deflate codepath in "git archive --format=zip" had a
>  longstanding bug coming from misuse of zlib API, which has been
>  corrected.
>
>  Will merge to 'master'.
>  source: <[email-masked]>

I see this was merged into 'next' with 4444b611dc (Merge branch
'jt/archive-zip-deflate-fix' into next, 2025-08-04), but was reverted
again in 5297b08916 (Revert "Merge branch 'jt/archive-zip-deflate-fix'
into next", 2025-08-04)

The fix in this patch definitely was the correct way forward, and it
fixed the issue at hand. So I don't think it should have been reverted.

I've sent a review and some patches in response, suggesting for an
alternative fix. I'm not claiming my fix is better, and it might
introduce other bug. I don't even know if the changes are even required.

To dive into the details: The output buffer for the compressed data is
twice the size of the input buffer. There is no reason to believe this
would cause any issues.

So currently I'm more in line with Justin, and I agree with the
pragmatic approach to only fix the issue we know is an issue, while we
keep the number of changed lines minimal.

Sorry for the confusion and for bringing in a concurrent series of
patches. Please ignore those and continue with this patch from Justin.

-- 
Cheers,
Toon