Web lists-archives.com

Re: [PATCH] clone: send server options when using protocol v2

Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes:

>> > Teach "clone" the same ability, except that because "clone" already
>> > has "-o" for another parameter, teach "clone" only to receive
>> > "--server-option".
>> Can you give an example of what this would be used for?  An example I
>> can think of might be
>> 	git clone --server-option=priority=batch <url>
> protocol-v2.txt says that it is server-specific, so I don't think I can
> give any meaningful examples here.

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.

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

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.