Jonathan Tan wrote:
> --- a/connect.c
> +++ b/connect.c
> @@ -172,8 +173,24 @@ struct ref **get_remote_heads(int in, char *src_buf,
> size_t src_len,
> continue;
> }
>
> + if (!strcmp(name, "capabilities^{}")) {
> + if (saw_response)
> + warning("protocol error: unexpected
> capabilities^{}, "
> + "continuing anyway");
Please use die() for these.
The warning is directed at the wrong user. The end-user isn't going
to be able to fix the server. The server owner is going to say "Git
works fine --- I'll ignore this". Client authors are going to
*eventually* discover the bad server and have to work around it. So
everyone suffers.
I feel strongly about this: because there are no servers that violate
this, it should be a fatal error. If we find a server that violates
this, we should weaken the spec and make all violations of the spec
still a fatal error.
The rest looks good.
Thanks for your patience,
Jonathan