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

Re: [PATCH 2/2] remote-curl.c: handle v1 when check_smart_http

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2021, 20:33 UTC
Message-ID
<xmqq35wkxper.fsf@gitster.g>
In-Reply-To
<xmqq7dlwxpn3.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
>> +	} else if (!strcmp(reader.line, "version 1")) {
>> +		die(_("v1 is just the original protocol with a version string, use v0 or v2 instead."));
>
> The user may no longer get "invalid response; got 'version 1'", but
> the above does not still explain why v1 is bad and v0 or v2 is
> welcome, either.  IOW, I do not think the patch improves the message
> to achieve what it attempted to do, i.e.
>
>     ... but the other side just treat it as "invalid response", this
>     can't explain why is not ok.
Alternatively
	v1 is not supported; use v0 or v2

would explain why the connection is refused. It explains why it is not ok much clearly than "just the original with a version string".

Show 6 quoted lines
> I wonder if it is a sensible and better alternative to treat v1
> response as if we got v0 (if v1 is truly the same as v0 except for
> the initial version advertisement).
>
> Input from those who are familiar with the protocol versions is very
> much appreciated.

This still stands; we reject because we don't support, but is it easy to support it instead, if there is no difference?

Previous: Junio C HamanoNext: Jeff King
Message 3 of 8 in “remote-curl.c: handle v1 when check_smart_http”
  1. 2/2 remote-curl.c: handle v1 when check_smart_httplilinchao@oschina.cn, Mar 24, 2021
  2. Junio C HamanoMar 24, 2021
  3. Junio C HamanoMar 24, 2021
  4. Jeff KingMar 26, 2021
  5. Jeff KingMar 26, 2021
  6. lilinchao@oschina.cnMar 25, 2021
  7. lilinchao@oschina.cnMar 29, 2021
  8. Jeff KingMar 29, 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.