summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 2cda554..fd341b8 100644
--- a/cgit.c
+++ b/cgit.c
@@ -137,24 +137,28 @@ void config_cb(const char *name, const char *value)
137 else if (ctx.repo && !strcmp(name, "repo.defbranch")) 137 else if (ctx.repo && !strcmp(name, "repo.defbranch"))
138 ctx.repo->defbranch = xstrdup(value); 138 ctx.repo->defbranch = xstrdup(value);
139 else if (ctx.repo && !strcmp(name, "repo.snapshots")) 139 else if (ctx.repo && !strcmp(name, "repo.snapshots"))
140 ctx.repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); /* XXX: &? */ 140 ctx.repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); /* XXX: &? */
141 else if (ctx.repo && !strcmp(name, "repo.enable-log-filecount")) 141 else if (ctx.repo && !strcmp(name, "repo.enable-log-filecount"))
142 ctx.repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value); 142 ctx.repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value);
143 else if (ctx.repo && !strcmp(name, "repo.enable-log-linecount")) 143 else if (ctx.repo && !strcmp(name, "repo.enable-log-linecount"))
144 ctx.repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); 144 ctx.repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value);
145 else if (ctx.repo && !strcmp(name, "repo.max-stats")) 145 else if (ctx.repo && !strcmp(name, "repo.max-stats"))
146 ctx.repo->max_stats = cgit_find_stats_period(value, NULL); 146 ctx.repo->max_stats = cgit_find_stats_period(value, NULL);
147 else if (ctx.repo && !strcmp(name, "repo.module-link")) 147 else if (ctx.repo && !strcmp(name, "repo.module-link"))
148 ctx.repo->module_link= xstrdup(value); 148 ctx.repo->module_link= xstrdup(value);
149 else if (ctx.repo && !strcmp(name, "repo.commit-filter"))
150 ctx.repo->commit_filter = new_filter(value, 0);
151 else if (ctx.repo && !strcmp(name, "repo.source-filter"))
152 ctx.repo->source_filter = new_filter(value, 1);
149 else if (ctx.repo && !strcmp(name, "repo.readme") && value != NULL) { 153 else if (ctx.repo && !strcmp(name, "repo.readme") && value != NULL) {
150 if (*value == '/') 154 if (*value == '/')
151 ctx.repo->readme = xstrdup(value); 155 ctx.repo->readme = xstrdup(value);
152 else 156 else
153 ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value)); 157 ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value));
154 } else if (!strcmp(name, "include")) 158 } else if (!strcmp(name, "include"))
155 parse_configfile(value, config_cb); 159 parse_configfile(value, config_cb);
156} 160}
157 161
158static void querystring_cb(const char *name, const char *value) 162static void querystring_cb(const char *name, const char *value)
159{ 163{
160 if (!strcmp(name,"r")) { 164 if (!strcmp(name,"r")) {