refs.c: flatten get_ref_store() a bit
[gitweb.git] / http-backend.c
index 52314039e383b46fff7f9b739fb6e002ddde97c2..eef0a361f4f9bcc7f8fb278268334cb40a32fcb3 100644 (file)
@@ -464,7 +464,7 @@ static void get_info_refs(struct strbuf *hdr, char *arg)
                hdr_str(hdr, content_type, buf.buf);
                end_headers(hdr);
 
-               packet_write(1, "# service=git-%s\n", svc->name);
+               packet_write_fmt(1, "# service=git-%s\n", svc->name);
                packet_flush(1);
 
                argv[0] = svc->name;
@@ -653,7 +653,7 @@ static int bad_request(struct strbuf *hdr, const struct service_cmd *c)
        return 0;
 }
 
-int main(int argc, char **argv)
+int cmd_main(int argc, const char **argv)
 {
        char *method = getenv("REQUEST_METHOD");
        char *dir;
@@ -662,9 +662,6 @@ int main(int argc, char **argv)
        int i;
        struct strbuf hdr = STRBUF_INIT;
 
-       git_setup_gettext();
-
-       git_extract_argv0_path(argv[0]);
        set_die_routine(die_webcgi);
        set_die_is_recursing_routine(die_webcgi_recursing);