git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 0/2] pkt-line.[ch]: dead code removal
Date: Thu, 21 Oct 2021 12:30:26 -0400	[thread overview]
Message-ID: <YXGVotqAxn859JZf@coredump.intra.peff.net> (raw)
In-Reply-To: <cover-0.2-00000000000-20211014T201317Z-avarab@gmail.com>

On Thu, Oct 14, 2021 at 10:15:10PM +0200, Ævar Arnfjörð Bjarmason wrote:

> Remove some dead code in pkt-line.[ch], perhaps someone has an
> objection to 2/2 as we could keep that function variant around "just
> in case", but it's trivial to use the underlying function (or re-add
> this utility), so shedding the unused code seems better.

These both look good to me.

It's perhaps a little weird to shed the now-always-NULL src arguments
from packet_read() in the second one, since the underlying function we
wrap still allows them.  But it does make the callers a little simpler,
and I think if we added any new callers that I'd much rather see them
use the struct-oriented packet_reader interface instead. Which is really
why it we can get rid of this function in the first place; it's old callers
are all using that interface.

In the long run, I'd be quite happy if could get rid of all of the
non-packet_reader calls entirely, but that's a much bigger topic. This
is a nice incremental step in that direction.

-Peff

      parent reply	other threads:[~2021-10-21 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 20:15 [PATCH 0/2] pkt-line.[ch]: dead code removal Ævar Arnfjörð Bjarmason
2021-10-14 20:15 ` [PATCH 1/2] pkt-line.[ch]: remove unused packet_buf_write_len() Ævar Arnfjörð Bjarmason
2021-10-14 20:15 ` [PATCH 2/2] pkt-line.[ch]: remove unused packet_read_line_buf() Ævar Arnfjörð Bjarmason
2021-10-21 16:30 ` Jeff King [this message]

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=YXGVotqAxn859JZf@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).