author | Jason A. Donenfeld <Jason@zx2c4.com> | 2010-07-29 17:47:50 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-08-04 01:09:32 (UTC) |
commit | 2e4a941626c240bc7858aa7564882c01f657f4e8 (patch) (side-by-side diff) | |
tree | 505c17fab5afcb99cfddf2c4aad0b95c8670f001 /cgit.c | |
parent | 3516502aa0df95ecc241caa30161741f59e4e600 (diff) | |
download | cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.zip cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.tar.gz cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.tar.bz2 |
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>
-rw-r--r-- | cgit.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -207,2 +207,4 @@ void config_cb(const char *name, const char *value) ctx.cfg.renamelimit = atoi(value); + else if (!strcmp(name, "remove-suffix")) + ctx.cfg.remove_suffix = atoi(value); else if (!strcmp(name, "robots")) @@ -304,2 +306,3 @@ static void prepare_context(struct cgit_context *ctx) ctx->cfg.renamelimit = -1; + ctx->cfg.remove_suffix = 0; ctx->cfg.robots = "index, nofollow"; |