about summary refs log tree commit diff stats
path: root/shared.c
diff options
context:
space:
mode:
authorLukas Fleischer2015-01-29 12:52:49 +0100
committerJason A. Donenfeld2015-01-29 16:41:14 +0100
commitc58cec9dff273b44c428cfaee24e5e3743c0034e (patch)
tree7302ee9868fa94b9cf64a2a361294ad2e4bc360f /shared.c
parentAdd Etags for snapshots (diff)
downloadcgit-c58cec9dff273b44c428cfaee24e5e3743c0034e.tar.gz
cgit-c58cec9dff273b44c428cfaee24e5e3743c0034e.zip
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 <cgit@cryptocrack.de>
Diffstat (limited to 'shared.c')
-rw-r--r--shared.c3
1 files changed, 3 insertions, 0 deletions
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)
75 ret->owner_filter = ctx.cfg.owner_filter; 75 ret->owner_filter = ctx.cfg.owner_filter;
76 ret->clone_url = ctx.cfg.clone_url; 76 ret->clone_url = ctx.cfg.clone_url;
77 ret->submodules.strdup_strings = 1; 77 ret->submodules.strdup_strings = 1;
78 ret->hide = ret->ignore = 0;
78 return ret; 79 return ret;
79} 80}
80 81
@@ -85,6 +86,8 @@ struct cgit_repo *cgit_get_repoinfo(const char *url)
85 86
86 for (i = 0; i < cgit_repolist.count; i++) { 87 for (i = 0; i < cgit_repolist.count; i++) {
87 repo = &cgit_repolist.repos[i]; 88 repo = &cgit_repolist.repos[i];
89 if (repo->ignore)
90 continue;
88 if (!strcmp(repo->url, url)) 91 if (!strcmp(repo->url, url))
89 return repo; 92 return repo;
90 } 93 }