From: Jonathan Nieder <jrnieder@gmail.com>
To: Devste Devste <devstemail@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Add warning when v0 protocol is used/downgraded
Date: Sun, 16 Jun 2024 15:33:41 +0000 [thread overview]
Message-ID: <Zm8EqOfc_v4KBVVK@google.com> (raw)
In-Reply-To: <CANM0SV3CQPRyJCDanB8JFpkAMwuoo-mg3A=_L743_GXJtoFtQA@mail.gmail.com>
Hi,
Devste Devste wrote:
> - When "git config protocol.version 2" is used, there is no
> warning/message when the remote returns a response in v0 format. This
> leads to any issues related to slow(er) git caused by old protocol use
> being unnoticed, leading to wasted time debugging.
Specifying protocol version is meant to be backward compatible, and
there are cases where the old protocol still needs to be used - for
example, if an SSH server doesn't support transmitting the
GIT_PROTOCOL environment variable, then having the fallback to v0 is
still useful there.
So I'd be concerned that printing the protocol version in the default
case would be overly disruptive for such cases. This would be even
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. :)
That said, I'm sympathetic to the debugging use case you've described
here. Do tools like GIT_TRACE_PACKET, GIT_TRACE2_EVENT, and "git
bugreport" produce the right information in these scenarios? Would
"git fetch -v" (i.e., when the user has explicitly asked git to be
more verbose) be a good place to provide some additional diagnostic
output?
> If
> protocol.version is not explicitly set or v2
> and both the local and server git version are >=2.26
> and the reply is not in v2 protocol format
Interesting! We haven't previously used the "agent" field (server
version) for anything other than logging it verbatim; I'd worry a bit
about getting into the same kind of mess as User-Agent parsing on the
web if we go that direction. But I would expect the main obstacles to
updating protocol version support to be in (a) reimplementations of
git protocol rather than the standard git reference implementation and
(b) plumbing such as httpd and sshd around git, rather than git
itself.
Thanks and hope that helps,
Jonathan
next prev parent reply other threads:[~2024-06-16 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-16 11:47 Add warning when v0 protocol is used/downgraded Devste Devste
2024-06-16 15:33 ` Jonathan Nieder [this message]
2024-06-17 1:19 ` Junio C Hamano
2024-06-18 18:24 ` Jeff King
2024-06-19 3:37 ` Devste Devste
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zm8EqOfc_v4KBVVK@google.com \
--to=jrnieder@gmail.com \
--cc=devstemail@gmail.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).