git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: lilinchao@oschina.cn
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] remote-curl.c: handle v1 when check_smart_http
Date: Wed, 24 Mar 2021 13:28:32 -0700	[thread overview]
Message-ID: <xmqq7dlwxpn3.fsf@gitster.g> (raw)
In-Reply-To: <006547b28c6311eb93820024e87935e7@oschina.cn> (lilinchao@oschina.cn's message of "Wed, 24 Mar 2021 13:36:48 +0800")

lilinchao@oschina.cn writes:

>  		 * be handled elsewhere.
>  		 */
>  		d->proto_git = 1;
> -

Unrelated removal.

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

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.

Thanks.

>  	} else {
>  		die(_("invalid server response; got '%s'"), reader.line);
>  	}

  reply	other threads:[~2021-03-24 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210324053648.25584-1-lilinchao@oschina.cn>
2021-03-24  5:36 ` [PATCH 2/2] remote-curl.c: handle v1 when check_smart_http lilinchao
2021-03-24 20:28   ` Junio C Hamano [this message]
2021-03-24 20:33     ` Junio C Hamano
     [not found]     ` <388751448ce011ebaaead4ae5278bc1265898@pobox.com>
2021-03-25  4:22       ` lilinchao
2021-03-26  6:24     ` Jeff King
2021-03-26  6:55       ` Jeff King
     [not found]     ` <e4d6bef08dfb11eb90f0a4badb2c2b1115536@peff.net>
2021-03-29  9:30       ` lilinchao
2021-03-29 10:40         ` Jeff King

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=xmqq7dlwxpn3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lilinchao@oschina.cn \
    /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).