about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Reichelt <hacking@nachtgeist.net>2015-08-10 09:45:48 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-08-12 14:08:15 +0200
commitdc41a0018058c81ee9a0a2dc6e89f737d7c1c966 (patch)
treeda7487e33a13b73e168fdcbbf9ff628977353d9b
parentcontrib/hooks: add sample post-receive hook using agefile (diff)
downloadcgit-pink-dc41a0018058c81ee9a0a2dc6e89f737d7c1c966.tar.gz
cgit-pink-dc41a0018058c81ee9a0a2dc6e89f737d7c1c966.zip
Fix processing of repo.hide and repo.ignore
If the global option enable-filter-overrides is set to 1 the repo-specific
options repo.hide and repo.ignore never got processed.

Signed-off-by: Daniel Reichelt <hacking@nachtgeist.net>
Reviewed-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to '')
-rw-r--r--cgit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cgit.c b/cgit.c
index ae413c6..8c9cfb5 100644
--- a/cgit.c
+++ b/cgit.c
@@ -82,6 +82,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
 		repo->logo = xstrdup(value);
 	else if (!strcmp(name, "logo-link") && value != NULL)
 		repo->logo_link = xstrdup(value);
+	else if (!strcmp(name, "hide"))
+		repo->hide = atoi(value);
+	else if (!strcmp(name, "ignore"))
+		repo->ignore = atoi(value);
 	else if (ctx.cfg.enable_filter_overrides) {
 		if (!strcmp(name, "about-filter"))
 			repo->about_filter = cgit_new_filter(value, ABOUT);
@@ -93,10 +97,6 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
 			repo->email_filter = cgit_new_filter(value, EMAIL);
 		else if (!strcmp(name, "owner-filter"))
 			repo->owner_filter = cgit_new_filter(value, OWNER);
-	} else if (!strcmp(name, "hide")) {
-		repo->hide = atoi(value);
-	} else if (!strcmp(name, "ignore")) {
-		repo->ignore = atoi(value);
 	}
 }