summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorJason A. Donenfeld <Jason@zx2c4.com>2010-07-29 18:38:01 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-08-04 01:09:32 (UTC)
commit119397b175874bd606952e93b7249ae4ffb9afbe (patch) (side-by-side diff)
tree98f6a7d5661a52120c11088ee474a2a5d7449f60 /cgit.c
parent2e4a941626c240bc7858aa7564882c01f657f4e8 (diff)
downloadcgit-119397b175874bd606952e93b7249ae4ffb9afbe.zip
cgit-119397b175874bd606952e93b7249ae4ffb9afbe.tar.gz
cgit-119397b175874bd606952e93b7249ae4ffb9afbe.tar.bz2
Add support for 'enable-gitweb-owner' option
When this option is enabled (which it is by default), cgit will lookup the 'gitweb.owner' setting in each git config file found when processing the 'scan-path' option. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index f9a42bb..eff5b7a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -132,12 +132,14 @@ void config_cb(const char *name, const char *value)
else if (!strcmp(name, "noheader"))
ctx.cfg.noheader = atoi(value);
else if (!strcmp(name, "snapshots"))
ctx.cfg.snapshots = cgit_parse_snapshots_mask(value);
else if (!strcmp(name, "enable-filter-overrides"))
ctx.cfg.enable_filter_overrides = atoi(value);
+ else if (!strcmp(name, "enable-gitweb-owner"))
+ ctx.cfg.enable_gitweb_owner = atoi(value);
else if (!strcmp(name, "enable-index-links"))
ctx.cfg.enable_index_links = atoi(value);
else if (!strcmp(name, "enable-log-filecount"))
ctx.cfg.enable_log_filecount = atoi(value);
else if (!strcmp(name, "enable-log-linecount"))
ctx.cfg.enable_log_linecount = atoi(value);
@@ -290,12 +292,13 @@ static void prepare_context(struct cgit_context *ctx)
ctx->cfg.cache_root_ttl = 5;
ctx->cfg.cache_scanrc_ttl = 15;
ctx->cfg.cache_static_ttl = -1;
ctx->cfg.css = "/cgit.css";
ctx->cfg.logo = "/cgit.png";
ctx->cfg.local_time = 0;
+ ctx->cfg.enable_gitweb_owner = 1;
ctx->cfg.enable_tree_linenumbers = 1;
ctx->cfg.max_repo_count = 50;
ctx->cfg.max_commit_count = 50;
ctx->cfg.max_lock_attempts = 5;
ctx->cfg.max_msg_len = 80;
ctx->cfg.max_repodesc_len = 80;