diff options
author | John Keeping <john@keeping.me.uk> | 2014-01-12 17:13:51 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-01-14 01:00:07 +0000 |
commit | 632efb25c07c1b014a4e8cfbbea759f517c2aaf6 (patch) | |
tree | d749ef94576b829a4b8fc5ef330beb27de452bf1 /cgit.c | |
parent | ed3497b0de6634350cd17b320538fba918d4084c (diff) | |
download | cgit-632efb25c07c1b014a4e8cfbbea759f517c2aaf6.tar cgit-632efb25c07c1b014a4e8cfbbea759f517c2aaf6.tar.gz cgit-632efb25c07c1b014a4e8cfbbea759f517c2aaf6.zip |
filter: add fprintf_filter function
This stops the code in cgit.c::print_repo needing to inspect the
cgit_filter structure, meaning that we can abstract out different filter
types that will have different fields that need to be printed.
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -706,11 +706,11 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "repo.enable-log-linecount=%d\n", repo->enable_log_linecount); if (repo->about_filter && repo->about_filter != ctx.cfg.about_filter) - fprintf(f, "repo.about-filter=%s\n", repo->about_filter->cmd); + cgit_fprintf_filter(repo->about_filter, f, "repo.about-filter="); if (repo->commit_filter && repo->commit_filter != ctx.cfg.commit_filter) - fprintf(f, "repo.commit-filter=%s\n", repo->commit_filter->cmd); + cgit_fprintf_filter(repo->commit_filter, f, "repo.commit-filter="); if (repo->source_filter && repo->source_filter != ctx.cfg.source_filter) - fprintf(f, "repo.source-filter=%s\n", repo->source_filter->cmd); + cgit_fprintf_filter(repo->source_filter, f, "repo.source-filter="); if (repo->snapshots != ctx.cfg.snapshots) { char *tmp = build_snapshot_setting(repo->snapshots); fprintf(f, "repo.snapshots=%s\n", tmp ? tmp : ""); |