From c58cec9dff273b44c428cfaee24e5e3743c0034e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 29 Jan 2015 12:52:49 +0100 Subject: Add repo.hide and repo.ignore These options can be used to hide a repository from the index or completely ignore a repository, respectively. They are particularly useful when used in combination with scan-path. Signed-off-by: Lukas Fleischer --- shared.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'shared.c') diff --git a/shared.c b/shared.c index 6e91857..ae17d78 100644 --- a/shared.c +++ b/shared.c @@ -75,6 +75,7 @@ struct cgit_repo *cgit_add_repo(const char *url) ret->owner_filter = ctx.cfg.owner_filter; ret->clone_url = ctx.cfg.clone_url; ret->submodules.strdup_strings = 1; + ret->hide = ret->ignore = 0; return ret; } @@ -85,6 +86,8 @@ struct cgit_repo *cgit_get_repoinfo(const char *url) for (i = 0; i < cgit_repolist.count; i++) { repo = &cgit_repolist.repos[i]; + if (repo->ignore) + continue; if (!strcmp(repo->url, url)) return repo; } -- cgit v1.2.3-70-g09d2