about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
authorTim Chen <timchen1@gmail.com>2012-01-03 16:02:14 +0000
committerLars Hjemli <hjemli@gmail.com>2012-01-03 16:02:14 +0000
commitf2ced535e9f2c2ada7f184735a07a1190a9d810f (patch)
tree0272646e2e0124737d637c0d5e7a858b4ba8f003 /cgit.c
parentui-log.c: do not show remote heads if enable-remote-branches=0 (diff)
downloadcgit-pink-f2ced535e9f2c2ada7f184735a07a1190a9d810f.tar.gz
cgit-pink-f2ced535e9f2c2ada7f184735a07a1190a9d810f.zip
Fix diff mode switching when side-by-side-diffs=1
When side-by-side-diffs=1 was set in cgitrc, specyfing 'ss=0' in the query-
string would not switch to unified diffs. This patch fixes the issue by
introducing a separate variable to track the occurrence of "ss" in the
querystring.
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 5259f56..435ce5a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -281,6 +281,7 @@ static void querystring_cb(const char *name, const char *value)
 		ctx.qry.period = xstrdup(value);
 	} else if (!strcmp(name, "ss")) {
 		ctx.qry.ssdiff = atoi(value);
+		ctx.qry.has_ssdiff = 1;
 	} else if (!strcmp(name, "all")) {
 		ctx.qry.show_all = atoi(value);
 	} else if (!strcmp(name, "context")) {
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