Subject: Re: Add warning when v0 protocol is used/downgraded

From: Junio C Hamano <[email-masked]>
Date: Sun, 16 Jun 2024 18:19:19 -0700

Jonathan Nieder <[email-masked]> writes:

> Specifying protocol version is meant to be backward compatible, and
> there are cases where the old protocol still needs to be used - for
> ...
> more so for protocol v2 for push, which doesn't exist yet - once it
> exists, it wouldn't be great if all pushes using existing servers
> produced an extra piece of noisy output. :)

I do not think it is a great idea to add this as a warning, as if
something bad is happening, either.

I also agree that it is a legitimate debugging issue.  When the user
sees some symptom, after learning that the same symptom was reported
to be associated with the use of v2 on the Internet somewhere, it is
reasonable for the user to want to see what protocol is being used,
in order to debug the configuration, especially when the user thinks
they configured to use v0 (or vice versa)

So I am all for (1) adding to, if it is not already done, this kind
of information to the GIT_TRACE* output, and (2) advertising and
advocating GIT_TRACE* stuff as a useful debugging tool.

Thanks.