+static int is_visible(struct cgit_repo *repo)
+{
+ if (repo->hide || repo->ignore)
+ return 0;
+ if (!(is_match(repo) && is_in_url(repo)))
+ return 0;
+ return 1;
+}
+
+static int any_repos_visible(void)
+{
+ int i;
+
+ for (i = 0; i < cgit_repolist.count; i++) {
+ if (is_visible(&cgit_repolist.repos[i]))
+ return 1;
+ }
+ return 0;
+}
+