From 96ceb9a95a7a321209cff347fefd141a9fffc7ca Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Mon, 4 Aug 2014 09:23:08 -0400 Subject: repolist: add owner-filter This allows custom links to be used for repository owners by configuring a filter to be applied in the "Owner" column in the repository list. --- filter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'filter.c') diff --git a/filter.c b/filter.c index 270f009..9f433db 100644 --- a/filter.c +++ b/filter.c @@ -38,12 +38,14 @@ void cgit_cleanup_filters(void) reap_filter(ctx.cfg.commit_filter); reap_filter(ctx.cfg.source_filter); reap_filter(ctx.cfg.email_filter); + reap_filter(ctx.cfg.owner_filter); reap_filter(ctx.cfg.auth_filter); for (i = 0; i < cgit_repolist.count; ++i) { reap_filter(cgit_repolist.repos[i].about_filter); reap_filter(cgit_repolist.repos[i].commit_filter); reap_filter(cgit_repolist.repos[i].source_filter); reap_filter(cgit_repolist.repos[i].email_filter); + reap_filter(cgit_repolist.repos[i].owner_filter); } } @@ -425,6 +427,10 @@ struct cgit_filter *cgit_new_filter(const char *cmd, filter_type filtertype) argument_count = 2; break; + case OWNER: + argument_count = 0; + break; + case SOURCE: case ABOUT: argument_count = 1; -- cgit v1.2.3-70-g09d2