mirror of
https://git.zx2c4.com/cgit
synced 2025-06-27 03:59:01 +02:00
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>
This commit is contained in:
parent
1a2eeb94d4
commit
c58cec9dff
5 changed files with 23 additions and 0 deletions
3
shared.c
3
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue