diff options
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -237,7 +237,7 @@ static void config_cb(const char *name, const char *value) | |||
237 | else if (!strcmp(name, "summary-tags")) | 237 | else if (!strcmp(name, "summary-tags")) |
238 | ctx.cfg.summary_tags = atoi(value); | 238 | ctx.cfg.summary_tags = atoi(value); |
239 | else if (!strcmp(name, "side-by-side-diffs")) | 239 | else if (!strcmp(name, "side-by-side-diffs")) |
240 | ctx.cfg.ssdiff = atoi(value); | 240 | ctx.cfg.difftype = atoi(value) ? DIFF_SSDIFF : DIFF_UNIFIED; |
241 | else if (!strcmp(name, "agefile")) | 241 | else if (!strcmp(name, "agefile")) |
242 | ctx.cfg.agefile = xstrdup(value); | 242 | ctx.cfg.agefile = xstrdup(value); |
243 | else if (!strcmp(name, "mimetype-file")) | 243 | else if (!strcmp(name, "mimetype-file")) |
@@ -312,9 +312,13 @@ static void querystring_cb(const char *name, const char *value) | |||
312 | ctx.qry.showmsg = atoi(value); | 312 | ctx.qry.showmsg = atoi(value); |
313 | } else if (!strcmp(name, "period")) { | 313 | } else if (!strcmp(name, "period")) { |
314 | ctx.qry.period = xstrdup(value); | 314 | ctx.qry.period = xstrdup(value); |
315 | } else if (!strcmp(name, "dt")) { | ||
316 | ctx.qry.difftype = atoi(value); | ||
317 | ctx.qry.has_difftype = 1; | ||
315 | } else if (!strcmp(name, "ss")) { | 318 | } else if (!strcmp(name, "ss")) { |
316 | ctx.qry.ssdiff = atoi(value); | 319 | /* No longer generated, but there may be links out there. */ |
317 | ctx.qry.has_ssdiff = 1; | 320 | ctx.qry.difftype = atoi(value) ? DIFF_SSDIFF : DIFF_UNIFIED; |
321 | ctx.qry.has_difftype = 1; | ||
318 | } else if (!strcmp(name, "all")) { | 322 | } else if (!strcmp(name, "all")) { |
319 | ctx.qry.show_all = atoi(value); | 323 | ctx.qry.show_all = atoi(value); |
320 | } else if (!strcmp(name, "context")) { | 324 | } else if (!strcmp(name, "context")) { |
@@ -372,7 +376,7 @@ static void prepare_context(void) | |||
372 | ctx.cfg.summary_log = 10; | 376 | ctx.cfg.summary_log = 10; |
373 | ctx.cfg.summary_tags = 10; | 377 | ctx.cfg.summary_tags = 10; |
374 | ctx.cfg.max_atom_items = 10; | 378 | ctx.cfg.max_atom_items = 10; |
375 | ctx.cfg.ssdiff = 0; | 379 | ctx.cfg.difftype = DIFF_UNIFIED; |
376 | ctx.env.cgit_config = getenv("CGIT_CONFIG"); | 380 | ctx.env.cgit_config = getenv("CGIT_CONFIG"); |
377 | ctx.env.http_host = getenv("HTTP_HOST"); | 381 | ctx.env.http_host = getenv("HTTP_HOST"); |
378 | ctx.env.https = getenv("HTTPS"); | 382 | ctx.env.https = getenv("HTTPS"); |