ls-refs: introduce ls-refs server command
[gitweb.git] / serve.c
diff --git a/serve.c b/serve.c
index 7ddcba9003aec90619ae5d0df0eee743014c0884..1cb5fb9b5b57de77b3b7d40301e67912b07a8849 100644 (file)
--- a/serve.c
+++ b/serve.c
@@ -4,8 +4,15 @@
 #include "pkt-line.h"
 #include "version.h"
 #include "argv-array.h"
+#include "ls-refs.h"
 #include "serve.h"
 
+static int always_advertise(struct repository *r,
+                           struct strbuf *value)
+{
+       return 1;
+}
+
 static int agent_advertise(struct repository *r,
                           struct strbuf *value)
 {
@@ -46,6 +53,7 @@ struct protocol_capability {
 
 static struct protocol_capability capabilities[] = {
        { "agent", agent_advertise, NULL },
+       { "ls-refs", always_advertise, ls_refs },
 };
 
 static void advertise_capabilities(void)