From f2ced535e9f2c2ada7f184735a07a1190a9d810f Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Tue, 3 Jan 2012 16:02:14 +0000 Subject: 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. --- cgit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cgit.c') 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")) { -- cgit v1.2.3-59-g8ed1b