From: Josh Steadmon <steadmon@google.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH v2 2/2] connect, protocol: log negotiated protocol version
Date: Fri, 6 Aug 2021 14:22:30 -0700 [thread overview]
Message-ID: <YQ2oFttZBFVZtEHm@google.com> (raw)
In-Reply-To: <874kc4mwqc.fsf@evledraar.gmail.com>
On 2021.08.05 04:47, Ævar Arnfjörð Bjarmason wrote:
>
> On Wed, Aug 04 2021, Taylor Blau wrote:
>
> > I didn't realize before that the unknown case really is dead code, so
> > we'll never log "<unknown>". And since the mapping from protocol_version
> > to string is identical for known values, we could probably do without
> > it.
> >
> > And I don't much care either way. I think the benefit is really pretty
> > slim, and arguably my code is just adding unnecessary overhead. So I'm
> > happy to go with or without it, but I'd be rather sad to spend much more
> > of our collective time discussing it.
>
> Yeah, I just think if we can be sure it's an integer *and* a valid
> version when we log it, people writing future log summarizing code will
> thank us, i.e. just 0, 1, 2, and in the future maybe 3, ..., but not -1
> or "<unknown>" or other values we'll trust die() etc. to handle.
Sounds good, in V3 I will switch back to logging the enum value
directly, and will make sure we don't log anything if the version is
unknown. Thanks both for the discussion!
next prev parent reply other threads:[~2021-08-06 21:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 20:13 [PATCH] connect, protocol: log negotiated protocol version Josh Steadmon
2021-08-03 21:12 ` Taylor Blau
2021-08-04 21:37 ` Josh Steadmon
2021-08-04 21:56 ` Junio C Hamano
2021-08-04 22:17 ` [PATCH v2 0/2] " Josh Steadmon
2021-08-04 22:17 ` [PATCH v2 1/2] protocol: add protocol version formatting function Josh Steadmon
2021-08-04 23:32 ` Ævar Arnfjörð Bjarmason
2021-08-04 22:17 ` [PATCH v2 2/2] connect, protocol: log negotiated protocol version Josh Steadmon
2021-08-04 22:28 ` Eric Sunshine
2021-08-06 21:15 ` Josh Steadmon
2021-08-04 23:40 ` Ævar Arnfjörð Bjarmason
2021-08-05 1:26 ` Taylor Blau
2021-08-05 2:47 ` Ævar Arnfjörð Bjarmason
2021-08-06 21:22 ` Josh Steadmon [this message]
2021-08-10 17:20 ` [PATCH v3] " Josh Steadmon
2021-08-16 18:03 ` Taylor Blau
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=YQ2oFttZBFVZtEHm@google.com \
--to=steadmon@google.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.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).