Thread (1 message) 1 message, 1 author, 2022-01-13

Re: [BUG] Re: Git 2.35.0-rc0

From: Junio C Hamano <hidden>
Date: 2022-01-13 18:03:08

Ævar Arnfjörð Bjarmason [off-list ref] writes:
https://lore.kernel.org/git/87wnn62nhp.fsf@evledraar.gmail.com/ (local) this use
of uncompress2() is just saving a few lines of boilerplate instead of
using the underlying zlib functions, which every other in-tree user
uses.
I looked at the source of uncompress2(), and I tend to agree that,
we do NOT HAVE TO add dependency on it.  You should be able to
rewrite the new caller without using it.

But this is a 5-year old API function, that first appeared how many
years ago in their public release?  In a few years, I would say that
we would be laughed at if we avoid it with "it is not available
everywhere".

And in the meantime, we ship a copy lifted from upstream, so those
with older zlib would be OK with it, too.

That is how I view what we have today.  To me, the logical
conclusion of the observation is that, we do not have good reason
to avoid it.

When we are adding a new piece of code that drives inflate(), we
should remember that we now have uncompress2() available in the
codebase, and see if we can simplify it by using uncompress2().  The
same is true for a case where we refactor existing code that can
become simpler with uncompress2().

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help