summaryrefslogtreecommitdiff
path: root/ui_70-repolist.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-07-30 06:58:49 +0100
committerKatolaZ <katolaz@freaknet.org>2018-07-30 06:58:49 +0100
commitee667540e07eaffaed612e8ca8572611ea1f42d9 (patch)
tree17ca186b87b06045eb85f7b8eadc0cb0b8fc3daa /ui_70-repolist.c
parentd466dfc252f9896b1d6bdce623067378e04b8e71 (diff)
fixed repolist
Diffstat (limited to 'ui_70-repolist.c')
-rw-r--r--ui_70-repolist.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/ui_70-repolist.c b/ui_70-repolist.c
index 7cf1da9..fd1c0e1 100644
--- a/ui_70-repolist.c
+++ b/ui_70-repolist.c
@@ -97,26 +97,33 @@ static int is_match(struct cgit_repo *repo)
return 1;
if (repo->owner && strcasestr(repo->owner, ctx.qry.search))
return 1;
+ fprintf(stdout, "i -- is_match has failed\n");
return 0;
}
static int is_in_url(struct cgit_repo *repo)
{
- if (!ctx.qry.url)
+ if (!ctx.qry.url){
+ fprintf(stdout, "i -- ctx.qry.url is NULL\n");
return 1;
- if (repo->url && starts_with(repo->url, ctx.qry.url))
+ }
+ if (repo->url && starts_with(repo->url, ctx.qry.url)){
+ fprintf(stdout, "i -- repo URL not in qry.url\n");
return 1;
+ }
return 0;
}
static int is_visible(struct cgit_repo *repo)
{
if (repo->hide || repo->ignore){
- fprintf(stderr, "%s is invisible or ignored", repo->name);
+ fprintf(stdout, "i -- repo: '%s' is invisible or ignored", repo->name);
return 0;
}
- if (!(is_match(repo) && is_in_url(repo)))
+ if (!(is_match(repo) && is_in_url(repo))){
+ fprintf(stdout, "i -- !(is_match(repo) && is_in_url(repo))\n");
return 0;
+ }
return 1;
}
@@ -124,6 +131,8 @@ static int any_repos_visible(void)
{
int i;
+ fprintf(stdout, "i -- ctx.qry.search: %s\n", ctx.qry.search);
+
for (i = 0; i < cgit_repolist.count; i++) {
if (is_visible(&cgit_repolist.repos[i]))
return 1;