aboutsummaryrefslogtreecommitdiff
path: root/cgit.c
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-19 15:23:28 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-19 15:28:18 +0200
commit0f11492868791513cbaae69c6476a00647f3fd47 (patch)
treebb1328076fd7d1091c1b63563cf76c8f7b936527 /cgit.c
parent09d24d7cd0b7e85633f2f43808b12871bb209d69 (diff)
downloadcgit-master.tar.gz
cgit-master.tar.bz2
cgit-master.zip
ui-snapshot: add option to disable prefixHEADmaster
Hi everyone, it is me, ui snapshot prefix remover 3000 here today coming at you with another git patch
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 2efa962..f2127e0 100644
--- a/cgit.c
+++ b/cgit.c
@@ -171,6 +171,8 @@ static void config_cb(const char *name, const char *value)
ctx.cfg.noheader = atoi(value);
else if (!strcmp(name, "snapshots"))
ctx.cfg.snapshots = cgit_parse_snapshots_mask(value);
+ else if (!strcmp(name, "enable-snapshot-prefix"))
+ ctx.cfg.enable_snapshot_prefix = atoi(value);
else if (!strcmp(name, "enable-filter-overrides"))
ctx.cfg.enable_filter_overrides = atoi(value);
else if (!strcmp(name, "enable-follow-links"))
@@ -399,6 +401,7 @@ static void prepare_context(void)
ctx.cfg.project_list = NULL;
ctx.cfg.renamelimit = -1;
ctx.cfg.remove_suffix = 0;
+ ctx.cfg.enable_snapshot_prefix = 1;
ctx.cfg.robots = "index, nofollow";
ctx.cfg.root_title = "Git repository browser";
ctx.cfg.root_desc = "a fast webinterface for the git dscm";