Fix broken sha1 locking
[gitweb.git] / daemon.c
index e430cfbc8d0f4daccaae19fe44c9d699db6412e8..a2954a0451316197621aed152c194d398aaee624 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -22,6 +22,7 @@ static const char daemon_usage[] =
 "           [--timeout=n] [--init-timeout=n] [--strict-paths]\n"
 "           [--base-path=path] [--user-path | --user-path=path]\n"
 "           [--reuseaddr] [--detach] [--pid-file=file]\n"
+"           [--[enable|disable|allow-override|forbid-override]=service]\n"
 "           [--user=user [[--group=group]] [directory...]";
 
 /* List of acceptable pathname prefixes */
@@ -324,7 +325,14 @@ static int upload_pack(void)
        return -1;
 }
 
+static int upload_archive(void)
+{
+       execl_git_cmd("upload-archive", ".", NULL);
+       return -1;
+}
+
 static struct daemon_service daemon_service[] = {
+       { "upload-archive", "uploadarch", upload_archive, 0, 1 },
        { "upload-pack", "uploadpack", upload_pack, 1, 1 },
 };
 
@@ -896,12 +904,12 @@ int main(int argc, char **argv)
                        enable_service(arg + 10, 0);
                        continue;
                }
-               if (!strncmp(arg, "--enable-override=", 18)) {
-                       make_service_overridable(arg + 18, 1);
+               if (!strncmp(arg, "--allow-override=", 17)) {
+                       make_service_overridable(arg + 17, 1);
                        continue;
                }
-               if (!strncmp(arg, "--disable-override=", 19)) {
-                       make_service_overridable(arg + 19, 0);
+               if (!strncmp(arg, "--forbid-override=", 18)) {
+                       make_service_overridable(arg + 18, 0);
                        continue;
                }
                if (!strcmp(arg, "--")) {