]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
Add support for 'enable-gitweb-owner' option
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 2364d1c99e87de0a02d2c59927424ee55588871c..eff5b7a1c618fdbe1446618631e97dd242692a3a 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -135,6 +135,8 @@ void config_cb(const char *name, const char *value)
                ctx.cfg.snapshots = cgit_parse_snapshots_mask(value);
        else if (!strcmp(name, "enable-filter-overrides"))
                ctx.cfg.enable_filter_overrides = atoi(value);
+       else if (!strcmp(name, "enable-gitweb-owner"))
+               ctx.cfg.enable_gitweb_owner = atoi(value);
        else if (!strcmp(name, "enable-index-links"))
                ctx.cfg.enable_index_links = atoi(value);
        else if (!strcmp(name, "enable-log-filecount"))
@@ -205,6 +207,8 @@ void config_cb(const char *name, const char *value)
                ctx.cfg.agefile = xstrdup(value);
        else if (!strcmp(name, "renamelimit"))
                ctx.cfg.renamelimit = atoi(value);
+       else if (!strcmp(name, "remove-suffix"))
+               ctx.cfg.remove_suffix = atoi(value);
        else if (!strcmp(name, "robots"))
                ctx.cfg.robots = xstrdup(value);
        else if (!strcmp(name, "clone-prefix"))
@@ -291,6 +295,7 @@ static void prepare_context(struct cgit_context *ctx)
        ctx->cfg.css = "/cgit.css";
        ctx->cfg.logo = "/cgit.png";
        ctx->cfg.local_time = 0;
+       ctx->cfg.enable_gitweb_owner = 1;
        ctx->cfg.enable_tree_linenumbers = 1;
        ctx->cfg.max_repo_count = 50;
        ctx->cfg.max_commit_count = 50;
@@ -302,6 +307,7 @@ static void prepare_context(struct cgit_context *ctx)
        ctx->cfg.module_link = "./?repo=%s&page=commit&id=%s";
        ctx->cfg.project_list = NULL;
        ctx->cfg.renamelimit = -1;
+       ctx->cfg.remove_suffix = 0;
        ctx->cfg.robots = "index, nofollow";
        ctx->cfg.root_title = "Git repository browser";
        ctx->cfg.root_desc = "a fast webinterface for the git dscm";