Diffstat (limited to 'shared.c')
| -rw-r--r-- | shared.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,6 +1,11 @@ /* shared.c: global vars + some callback functions * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Add cgit_have_repository() + * Add ci filter configuration * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -13,6 +18,11 @@ struct cgit_repolist cgit_repolist; struct cgit_context ctx; +int cgit_have_repository(void) +{ + return startup_info->have_repository; +} + int chk_zero(int result, char *msg) { if (result != 0) @@ -59,6 +69,9 @@ struct cgit_repo *cgit_add_repo(const char *url) ret->extra_head_content = NULL; ret->owner = NULL; ret->homepage = NULL; + ret->ci_url = ctx.cfg.ci_url; + ret->ci_branch_url = ctx.cfg.ci_branch_url; + ret->ci_tag_url = ctx.cfg.ci_tag_url; ret->section = ctx.cfg.section; ret->snapshots = ctx.cfg.snapshots; ret->enable_blame = ctx.cfg.enable_blame; @@ -80,6 +93,7 @@ struct cgit_repo *cgit_add_repo(const char *url) ret->source_filter = ctx.cfg.source_filter; ret->email_filter = ctx.cfg.email_filter; ret->owner_filter = ctx.cfg.owner_filter; + ret->ci_filter = ctx.cfg.ci_filter; ret->clone_url = ctx.cfg.clone_url; ret->submodules.strdup_strings = 1; ret->hide = ret->ignore = 0; |