git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: gitster@pobox.com
Cc: jonathantanmy@google.com, jrnieder@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH] clone: send server options when using protocol v2
Date: Tue,  9 Apr 2019 11:49:49 -0700	[thread overview]
Message-ID: <20190409184949.207114-1-jonathantanmy@google.com> (raw)
In-Reply-To: <xmqqk1g342xi.fsf@gitster-ct.c.googlers.com>

> Does the code behave sensibly when the --server-option=... option is
> given and
> 
>  (a) the given option is not understood by the other side that talks
>      protocol v2?  Or
> 
>  (b) it turns out that the other side does not talk protocol v2?
> 
> In the former case, I would expect that there would be a way to
> respond with a failure for the other side and "git clone" should
> notice and respond by die()-ing at the end.

Right now, the server ignores it (it collects them as "keys" in
process_request() in serve.c and then passes them to the individual
commands, but they don't do anything about it).

Right now it's documented as:

	-o <option>::
	--server-option=<option>::
		Transmit the given string to the server when communicating using
		protocol version 2.  The given string must not contain a NUL or LF
		character.
		When multiple `--server-option=<option>` are given, they are all
		sent to the other side in the order listed on the command line.

I'm inclined to add:

  The server's handling of server options, including unknown ones, is
  server-specific.

> In the latter case, I would expect at least that a warning about
> accepted but ignored server-option to be given, or "git clone" to
> fail with an error "cannot honor the server-option".

Right now there's no warning, but I'll add one in the next reroll to
both "fetch" and "clone".

> If the code does not match the above expectations, at least that
> should be documented, I think.  If "git fetch" shares the same
> issue, this would be a good time to address it, too.

  reply	other threads:[~2019-04-09 18:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 20:44 [PATCH] clone: send server options when using protocol v2 Jonathan Tan
2019-04-06 11:57 ` Jonathan Nieder
2019-04-08 17:11   ` Jonathan Tan
2019-04-09 15:24     ` Junio C Hamano
2019-04-09 18:49       ` Jonathan Tan [this message]
2019-04-09 20:31 ` [PATCH v2 0/2] Server options when cloning Jonathan Tan
2019-04-09 20:31   ` [PATCH v2 1/2] transport: warn if server options are unsupported Jonathan Tan
2019-04-09 20:45     ` Jonathan Nieder
2019-04-10  3:51       ` Junio C Hamano
2019-04-09 20:31   ` [PATCH v2 2/2] clone: send server options when using protocol v2 Jonathan Tan
2019-04-09 20:46     ` Jonathan Nieder
2019-04-11 20:30 ` [PATCH v3 0/2] Server options when cloning Jonathan Tan
2019-04-11 20:30   ` [PATCH v3 1/2] transport: warn if server options are unsupported Jonathan Tan
2019-04-12  5:35     ` Junio C Hamano
2019-04-11 20:30   ` [PATCH v3 2/2] clone: send server options when using protocol v2 Jonathan Tan
2019-04-12 19:51 ` [PATCH v4 0/2] Server options when cloning Jonathan Tan
2019-04-12 19:51   ` [PATCH v4 1/2] transport: die if server options are unsupported Jonathan Tan
2019-04-12 20:12     ` SZEDER Gábor
2019-04-15  4:48       ` Re* " Junio C Hamano
2019-04-15  4:54         ` Junio C Hamano
2019-04-15  9:43         ` SZEDER Gábor
2019-04-12 19:51   ` [PATCH v4 2/2] clone: send server options when using protocol v2 Jonathan Tan

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190409184949.207114-1-jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).