summaryrefslogtreecommitdiff
path: root/http-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/http-backend.c b/http-backend.c
index 88d2a9bc40..adaef16fad 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -5,13 +5,14 @@
#include "pkt-line.h"
#include "object.h"
#include "tag.h"
-#include "exec_cmd.h"
+#include "exec-cmd.h"
#include "run-command.h"
#include "string-list.h"
#include "url.h"
#include "argv-array.h"
#include "packfile.h"
#include "object-store.h"
+#include "protocol.h"
static const char content_type[] = "Content-Type";
static const char content_length[] = "Content-Length";
@@ -468,8 +469,11 @@ static void get_info_refs(struct strbuf *hdr, char *arg)
hdr_str(hdr, content_type, buf.buf);
end_headers(hdr);
- packet_write_fmt(1, "# service=git-%s\n", svc->name);
- packet_flush(1);
+
+ if (determine_protocol_version_server() != protocol_v2) {
+ packet_write_fmt(1, "# service=git-%s\n", svc->name);
+ packet_flush(1);
+ }
argv[0] = svc->name;
run_service(argv, 0);