mirror of
https://git.zx2c4.com/cgit
synced 2025-06-24 10:48:44 +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
6
cgit.c
6
cgit.c
|
@ -93,6 +93,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
|
|||
repo->email_filter = cgit_new_filter(value, EMAIL);
|
||||
else if (!strcmp(name, "owner-filter"))
|
||||
repo->owner_filter = cgit_new_filter(value, OWNER);
|
||||
} else if (!strcmp(name, "hide")) {
|
||||
repo->hide = atoi(value);
|
||||
} else if (!strcmp(name, "ignore")) {
|
||||
repo->ignore = atoi(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -828,6 +832,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
|
|||
else if (repo->commit_sort == 2)
|
||||
fprintf(f, "repo.commit-sort=topo\n");
|
||||
}
|
||||
fprintf(f, "repo.hide=%d\n", repo->hide);
|
||||
fprintf(f, "repo.ignore=%d\n", repo->ignore);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue