git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: rsbecker@nexbridge.com, 'Taylor Blau' <me@ttaylorr.com>,
	git@vger.kernel.org, Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: Re: [BUG] Re: Git 2.35.0-rc0
Date: Thu, 13 Jan 2022 10:03:01 -0800	[thread overview]
Message-ID: <xmqqv8ynikdm.fsf@gitster.g> (raw)
In-Reply-To: <220113.864k67vkea.gmgdl@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 13 Jan 2022 14:21:44 +0100")

Æ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.

  reply	other threads:[~2022-01-13 18:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  2:20 [BUG] Re: Git 2.35.0-rc0 rsbecker
2022-01-11  2:52 ` Taylor Blau
2022-01-11  2:57   ` rsbecker
2022-01-11  3:00     ` Taylor Blau
2022-01-11  3:03       ` rsbecker
2022-01-11  3:51       ` rsbecker
2022-01-11 12:51         ` rsbecker
2022-01-11 19:53         ` Taylor Blau
2022-01-11 20:39           ` rsbecker
2022-01-12 19:18         ` Junio C Hamano
2022-01-12 19:21           ` Taylor Blau
2022-01-13 13:21           ` Ævar Arnfjörð Bjarmason
2022-01-13 18:03             ` Junio C Hamano [this message]
     [not found] <00ef01d80691$82df3380$889d9a80$@nexbridge.com>
2022-01-11  2:25 ` rsbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqv8ynikdm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hanwenn@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).