config: add repo inline-readme list
This allows the user to choose to override any global
inline-readme list for a specific repo, using the
same kind of semantics as the other repo overrides.
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: John Keeping <john@keeping.me.uk>
diff --git a/cgit.c b/cgit.c
index bf62199..bdb2fad 100644
--- a/cgit.c
+++ b/cgit.c
@@ -105,7 +105,12 @@
repo->hide = atoi(value);
else if (!strcmp(name, "ignore"))
repo->ignore = atoi(value);
- else if (ctx.cfg.enable_filter_overrides) {
+ else if (!strcmp(name, "inline-readme")) {
+ if (repo->inline_readme.items == ctx.cfg.inline_readme.items)
+ string_list_init(&repo->inline_readme, 1);
+
+ string_list_append(&repo->inline_readme, value);
+ } else if (ctx.cfg.enable_filter_overrides) {
if (!strcmp(name, "about-filter"))
repo->about_filter = cgit_new_filter(value, ABOUT);
else if (!strcmp(name, "commit-filter"))