summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-03-15 17:31:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-15 19:01:09 (GMT)
commit237ffedd46098a5b8a303cfbac7ecb0ff3a8a7a7 (patch)
tree640381b1d928b27093a4244fd9c1d128de900926 /remote-curl.c
parent884e586f9ef46406263720523377298a90b41065 (diff)
downloadgit-237ffedd46098a5b8a303cfbac7ecb0ff3a8a7a7.zip
git-237ffedd46098a5b8a303cfbac7ecb0ff3a8a7a7.tar.gz
git-237ffedd46098a5b8a303cfbac7ecb0ff3a8a7a7.tar.bz2
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>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index b4e9db8..66a53f7 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)