t4014: abstract away SHA-1-specific constants
[gitweb.git] / serve.c
diff --git a/serve.c b/serve.c
index 7ddcba9003aec90619ae5d0df0eee743014c0884..a5a7b2f7dd243c9dda3a29eda37aca8f96c3f0a5 100644 (file)
--- a/serve.c
+++ b/serve.c
@@ -4,7 +4,15 @@
 #include "pkt-line.h"
 #include "version.h"
 #include "argv-array.h"
+#include "ls-refs.h"
 #include "serve.h"
+#include "upload-pack.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 +54,8 @@ struct protocol_capability {
 
 static struct protocol_capability capabilities[] = {
        { "agent", agent_advertise, NULL },
+       { "ls-refs", always_advertise, ls_refs },
+       { "fetch", upload_pack_advertise, upload_pack_v2 },
 };
 
 static void advertise_capabilities(void)