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

Re: [BUG] Re: Git 2.35.0-rc0

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 13, 2022, 18:03 UTC
Message-ID
<xmqqv8ynikdm.fsf@gitster.g>
In-Reply-To
<220113.864k67vkea.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> https://lore.kernel.org/git/87wnn62nhp.fsf@evledraar.gmail.com/ 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.
Previous: Ævar Arnfjörð Bjarmason
Message 13 of 13 in “[BUG] Re: Git 2.35.0-rc0”
  1. rsbecker@nexbridge.comJan 11, 2022
  2. Taylor BlauJan 11, 2022
  3. rsbecker@nexbridge.comJan 11, 2022
  4. Taylor BlauJan 11, 2022
  5. rsbecker@nexbridge.comJan 11, 2022
  6. rsbecker@nexbridge.comJan 11, 2022
  7. rsbecker@nexbridge.comJan 11, 2022
  8. Taylor BlauJan 11, 2022
  9. rsbecker@nexbridge.comJan 11, 2022
  10. Junio C HamanoJan 12, 2022
  11. Taylor BlauJan 12, 2022
  12. Ævar Arnfjörð BjarmasonJan 13, 2022
  13. Junio C HamanoJan 13, 2022

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.