git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Add warning when v0 protocol is used/downgraded
@ 2024-06-16 11:47 Devste Devste
  2024-06-16 15:33 ` Jonathan Nieder
  0 siblings, 1 reply; 5+ messages in thread
From: Devste Devste @ 2024-06-16 11:47 UTC (permalink / raw)
  To: git

- 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.

- v2 protocol has been standard since 2.26
https://github.com/git/git/blob/master/Documentation/RelNotes/2.26.0.txt#L101
However, there are still large providers (that rhyme with
Nuntucket...) that do not support it/have actively disabled it now
(years after the release)
Additionally, we encountered various self-hosted git servers that had
the protocol version restricted to 1 in their initial setup and this
being forgotten about. This led to unnecessarily slow fetches by their
users unaware of this problem, since git just silently accepts v1 (0)
protocol.

Since v2 is the default protocol, I think it would be expected that if
a non-default protocol reply is returned, there is a message shown to
the user (like e.g. the detached head warning) to make the user aware
that an outdated git protocol was used making git slow.

Otherwise, this (currently) leads to reports that e.g. git fetch is
getting slower and slower (as repo sizes increase over time). However
the issue in all cases we have handled so far, has always been that
the old protocol was used without the user being aware of it and not
an issue with git itself.

e.g.
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-19  3:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 11:47 Add warning when v0 protocol is used/downgraded Devste Devste
2024-06-16 15:33 ` Jonathan Nieder
2024-06-17  1:19   ` Junio C Hamano
2024-06-18 18:24   ` Jeff King
2024-06-19  3:37     ` Devste Devste

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).