From 2e4a941626c240bc7858aa7564882c01f657f4e8 Mon Sep 17 00:00:00 2001 From: Jason A. Donenfeld Date: Thu, 29 Jul 2010 19:47:50 +0200 Subject: Add support for 'remove-suffix' option When this option is enabled, the '.git' suffix of repository directories found while processing the 'scan-path' option will be removed. Signed-off-by: Jason A. Donenfeld Signed-off-by: Lars Hjemli --- cgit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index 2364d1c..f9a42bb 100644 --- a/cgit.c +++ b/cgit.c @@ -205,6 +205,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")) @@ -302,6 +304,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"; -- cgit v1.2.3-70-g09d2