diff options
author | Lukas Fleischer | 2015-01-29 12:52:49 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2015-01-29 16:41:14 +0100 |
commit | c58cec9dff273b44c428cfaee24e5e3743c0034e (patch) | |
tree | 7302ee9868fa94b9cf64a2a361294ad2e4bc360f /cgit.c | |
parent | 1a2eeb94d42b983213076906eb5c5b85452b2c30 (diff) | |
download | cgit-c58cec9dff273b44c428cfaee24e5e3743c0034e.tar.gz cgit-c58cec9dff273b44c428cfaee24e5e3743c0034e.tar.bz2 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 'cgit.c')
-rw-r--r-- | cgit.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -93,6 +93,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va | |||
93 | repo->email_filter = cgit_new_filter(value, EMAIL); | 93 | repo->email_filter = cgit_new_filter(value, EMAIL); |
94 | else if (!strcmp(name, "owner-filter")) | 94 | else if (!strcmp(name, "owner-filter")) |
95 | repo->owner_filter = cgit_new_filter(value, OWNER); | 95 | repo->owner_filter = cgit_new_filter(value, OWNER); |
96 | } else if (!strcmp(name, "hide")) { | ||
97 | repo->hide = atoi(value); | ||
98 | } else if (!strcmp(name, "ignore")) { | ||
99 | repo->ignore = atoi(value); | ||
96 | } | 100 | } |
97 | } | 101 | } |
98 | 102 | ||
@@ -828,6 +832,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo) | |||
828 | else if (repo->commit_sort == 2) | 832 | else if (repo->commit_sort == 2) |
829 | fprintf(f, "repo.commit-sort=topo\n"); | 833 | fprintf(f, "repo.commit-sort=topo\n"); |
830 | } | 834 | } |
835 | fprintf(f, "repo.hide=%d\n", repo->hide); | ||
836 | fprintf(f, "repo.ignore=%d\n", repo->ignore); | ||
831 | fprintf(f, "\n"); | 837 | fprintf(f, "\n"); |
832 | } | 838 | } |
833 | 839 | ||