From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Mon, 10 Aug 2015 09:31:15 +0100 Subject: [PATCH] Fix processing of repo.hide and repo.ignore In-Reply-To: <55C856AC.50306@nachtgeist.net> References: <55C856AC.50306@nachtgeist.net> Message-ID: <20150810083115.GF30507@serenity.lan> On Mon, Aug 10, 2015 at 09:45:48AM +0200, Daniel Reichelt wrote: > 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 Reviewed-by: John Keeping > --- > cgit.c | 8 ++++---- > 1 file 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); > } > } > > -- > 2.1.4