From 237ffedd46098a5b8a303cfbac7ecb0ff3a8a7a7 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 15 Mar 2018 10:31:40 -0700 Subject: http: eliminate "# service" line when using protocol v2 When an http info/refs request is made, requesting that protocol v2 be used, don't send a "# service" line since this line is not part of the v2 spec. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- remote-curl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'remote-curl.c') diff --git a/remote-curl.c b/remote-curl.c index b4e9db85bb..66a53f74bb 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -396,6 +396,9 @@ static struct discovery *discover_refs(const char *service, int for_push) ; last->proto_git = 1; + } else if (maybe_smart && + last->len > 5 && starts_with(last->buf + 4, "version 2")) { + last->proto_git = 1; } if (last->proto_git) -- cgit v1.2.3