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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
884e586f9e
commit
237ffedd46
@ -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)
|
||||
|
Reference in New Issue
Block a user