From dce9812e5f4b5b2bb520ffc93b9847cb6fcb2075 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 17:48:01 -1000 Subject: Key the cached scan on every setting it uses Two cgitrc files sharing a cache-root read one list, so strict-export and trust-scan-config set in one applied to the other, and a changed setting stayed stale until the list expired. The first request after an upgrade scans again, and the files under the old names are never read. --- source/shared.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/shared.c') diff --git a/source/shared.c b/source/shared.c index 1e1bb26..1cfe4b0 100644 --- a/source/shared.c +++ b/source/shared.c @@ -37,6 +37,8 @@ struct cgit_repo *cgit_add_repo(const char *url) } repo->name = repo->url; repo->desc = cgit_default_repo_desc; + // A cached scan keeps these copies, so build_scan_key in cgit.c has to + // name every setting copied here. repo->section = ctx.cfg.section; repo->snapshots = ctx.cfg.snapshots; repo->enable_blame = ctx.cfg.enable_blame; -- cgit 2.12.1