aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Bieniek2012-04-18 12:32:13 +0200
committerJason A. Donenfeld2012-10-16 23:00:50 +0200
commit8f40be229cf8ac7ecbf5e03e11098bad8e82e7e5 (patch)
tree4474bda5b83077d18231d4075cd76a3c41be6acd
parenta9a6a205608c83125841f8f0b2aca07476cd2113 (diff)
downloadcgit-8f40be229cf8ac7ecbf5e03e11098bad8e82e7e5.tar.gz
cgit-8f40be229cf8ac7ecbf5e03e11098bad8e82e7e5.tar.bz2
cgit-8f40be229cf8ac7ecbf5e03e11098bad8e82e7e5.zip
repo_config: do not let globals override repo settings
This makes it possible to activate the enable_commit_graph, enable_log_filecount, and enable_log_linecount for individual repositories, even if the global setting is "0" (default). The commit that introduced the broken behavior was e189344, and the commit message of that makes it clear that this wasn't the intended behavior. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--cgit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgit.c b/cgit.c
index 1ec02e7..3299936 100644
--- a/cgit.c
+++ b/cgit.c
@@ -75,11 +75,11 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
75 else if (!strcmp(name, "snapshots")) 75 else if (!strcmp(name, "snapshots"))
76 repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); 76 repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value);
77 else if (!strcmp(name, "enable-commit-graph")) 77 else if (!strcmp(name, "enable-commit-graph"))
78 repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value); 78 repo->enable_commit_graph = atoi(value);
79 else if (!strcmp(name, "enable-log-filecount")) 79 else if (!strcmp(name, "enable-log-filecount"))
80 repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value); 80 repo->enable_log_filecount = atoi(value);
81 else if (!strcmp(name, "enable-log-linecount")) 81 else if (!strcmp(name, "enable-log-linecount"))
82 repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); 82 repo->enable_log_linecount = atoi(value);
83 else if (!strcmp(name, "enable-remote-branches")) 83 else if (!strcmp(name, "enable-remote-branches"))
84 repo->enable_remote_branches = atoi(value); 84 repo->enable_remote_branches = atoi(value);
85 else if (!strcmp(name, "enable-subject-links")) 85 else if (!strcmp(name, "enable-subject-links"))