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

Re: [PATCH v2 2/2] connect, protocol: log negotiated protocol version

From
Josh Steadmon <steadmon@google.com>
Date
Aug 6, 2021, 21:22 UTC
Message-ID
<YQ2oFttZBFVZtEHm@google.com>
In-Reply-To
<874kc4mwqc.fsf@evledraar.gmail.com>
On 2021.08.05 04:47, Ævar Arnfjörð Bjarmason wrote:
Show 17 quoted lines
> 
> 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!

Previous: Ævar Arnfjörð BjarmasonNext: Josh Steadmon
Message 14 of 16 in “connect, protocol: log negotiated protocol version”
  1. connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 3, 2021
  2. Taylor BlauAug 3, 2021
  3. Josh SteadmonAug 4, 2021
  4. Junio C HamanoAug 4, 2021
  5. 0/2 log negotiated protocol version.Josh Steadmon, Aug 4, 2021
  6. 1/2 protocol: add protocol version formatting functionJosh Steadmon, Aug 4, 2021
  7. Ævar Arnfjörð BjarmasonAug 4, 2021
  8. 2/2 connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 4, 2021
  9. Eric SunshineAug 4, 2021
  10. Josh SteadmonAug 6, 2021
  11. Ævar Arnfjörð BjarmasonAug 4, 2021
  12. Taylor BlauAug 5, 2021
  13. Ævar Arnfjörð BjarmasonAug 5, 2021
  14. Josh SteadmonAug 6, 2021
  15. connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 10, 2021
  16. Taylor BlauAug 16, 2021

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.