aboutsummaryrefslogtreecommitdiffstats
path: root/serve.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-03-15 10:31:19 -0700
committerJunio C Hamano <gitster@pobox.com>2018-03-15 12:01:08 -0700
commited10cb952d315ae47d2f7f6f29333a9ee227bf6b (patch)
treea43a1a343f94885533ba29358aab9c673aa95e29 /serve.h
parent74e70029615ead3e7203fed715abf0dc31bcb211 (diff)
downloadgit-ed10cb952d315ae47d2f7f6f29333a9ee227bf6b.tar.gz
serve: introduce git-serve
Introduce git-serve, the base server for protocol version 2. Protocol version 2 is intended to be a replacement for Git's current wire protocol. The intention is that it will be a simpler, less wasteful protocol which can evolve over time. Protocol version 2 improves upon version 1 by eliminating the initial ref advertisement. In its place a server will export a list of capabilities and commands which it supports in a capability advertisement. A client can then request that a particular command be executed by providing a number of capabilities and command specific parameters. At the completion of a command, a client can request that another command be executed or can terminate the connection by sending a flush packet. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'serve.h')
-rw-r--r--serve.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/serve.h b/serve.h
new file mode 100644
index 0000000000..fe65ba9f46
--- /dev/null
+++ b/serve.h
@@ -0,0 +1,15 @@
+#ifndef SERVE_H
+#define SERVE_H
+
+struct argv_array;
+extern int has_capability(const struct argv_array *keys, const char *capability,
+ const char **value);
+
+struct serve_options {
+ unsigned advertise_capabilities;
+ unsigned stateless_rpc;
+};
+#define SERVE_OPTIONS_INIT { 0 }
+extern void serve(struct serve_options *options);
+
+#endif /* SERVE_H */