aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorGravatar Tim Chen <timchen1@gmail.com>2012-01-04 01:02:14 (JST)
committerGravatar Lars Hjemli <hjemli@gmail.com>2012-01-04 01:02:14 (JST)
commitf2ced535e9f2c2ada7f184735a07a1190a9d810f (patch)
tree0272646e2e0124737d637c0d5e7a858b4ba8f003 /cgit.c
parent0b6a716d1b9f18e8cc00940a7962e542b9358238 (diff)
downloadcgit-f2ced535e9f2c2ada7f184735a07a1190a9d810f.zip
cgit-f2ced535e9f2c2ada7f184735a07a1190a9d810f.tar.gz
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)
281 ctx.qry.period = xstrdup(value); 281 ctx.qry.period = xstrdup(value);
282 } else if (!strcmp(name, "ss")) { 282 } else if (!strcmp(name, "ss")) {
283 ctx.qry.ssdiff = atoi(value); 283 ctx.qry.ssdiff = atoi(value);
284 ctx.qry.has_ssdiff = 1;
284 } else if (!strcmp(name, "all")) { 285 } else if (!strcmp(name, "all")) {
285 ctx.qry.show_all = atoi(value); 286 ctx.qry.show_all = atoi(value);
286 } else if (!strcmp(name, "context")) { 287 } else if (!strcmp(name, "context")) {