mirror of
https://git.zx2c4.com/cgit
synced 2025-08-29 22:19:27 +02:00
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 <Jason@zx2c4.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
3516502aa0
commit
2e4a941626
4 changed files with 13 additions and 0 deletions
3
cgit.c
3
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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue