about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/cgit.c b/cgit.c
index 8c4517d..db60107 100644
--- a/cgit.c
+++ b/cgit.c
@@ -237,7 +237,7 @@ static void config_cb(const char *name, const char *value)
 	else if (!strcmp(name, "summary-tags"))
 		ctx.cfg.summary_tags = atoi(value);
 	else if (!strcmp(name, "side-by-side-diffs"))
-		ctx.cfg.ssdiff = atoi(value);
+		ctx.cfg.difftype = atoi(value) ? DIFF_SSDIFF : DIFF_UNIFIED;
 	else if (!strcmp(name, "agefile"))
 		ctx.cfg.agefile = xstrdup(value);
 	else if (!strcmp(name, "mimetype-file"))
@@ -312,9 +312,13 @@ static void querystring_cb(const char *name, const char *value)
 		ctx.qry.showmsg = atoi(value);
 	} else if (!strcmp(name, "period")) {
 		ctx.qry.period = xstrdup(value);
+	} else if (!strcmp(name, "dt")) {
+		ctx.qry.difftype = atoi(value);
+		ctx.qry.has_difftype = 1;
 	} else if (!strcmp(name, "ss")) {
-		ctx.qry.ssdiff = atoi(value);
-		ctx.qry.has_ssdiff = 1;
+		/* No longer generated, but there may be links out there. */
+		ctx.qry.difftype = atoi(value) ? DIFF_SSDIFF : DIFF_UNIFIED;
+		ctx.qry.has_difftype = 1;
 	} else if (!strcmp(name, "all")) {
 		ctx.qry.show_all = atoi(value);
 	} else if (!strcmp(name, "context")) {
@@ -372,7 +376,7 @@ static void prepare_context(void)
 	ctx.cfg.summary_log = 10;
 	ctx.cfg.summary_tags = 10;
 	ctx.cfg.max_atom_items = 10;
-	ctx.cfg.ssdiff = 0;
+	ctx.cfg.difftype = DIFF_UNIFIED;
 	ctx.env.cgit_config = getenv("CGIT_CONFIG");
 	ctx.env.http_host = getenv("HTTP_HOST");
 	ctx.env.https = getenv("HTTPS");
ref='/src/commit/etc/tf/cfg/sniper.cfg?id=cbf8a5807e29fee4b34e128eba04fd0aded383e7&follow=1'>Use sensitivity aliases in TF2June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe 2019-09-08Set title User-AgentJune McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe