diff options
-rw-r--r-- | cgit.c | 1 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | ui-diff.c | 3 |
3 files changed, 3 insertions, 2 deletions
@@ -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")) { |
@@ -133,6 +133,7 @@ struct reflist { | |||
133 | struct cgit_query { | 133 | struct cgit_query { |
134 | int has_symref; | 134 | int has_symref; |
135 | int has_sha1; | 135 | int has_sha1; |
136 | int has_ssdiff; | ||
136 | char *raw; | 137 | char *raw; |
137 | char *repo; | 138 | char *repo; |
138 | char *page; | 139 | char *page; |
@@ -372,8 +372,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi | |||
372 | } | 372 | } |
373 | } | 373 | } |
374 | 374 | ||
375 | if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) | 375 | use_ssdiff = ctx.qry.has_ssdiff ? ctx.qry.ssdiff : ctx.cfg.ssdiff; |
376 | use_ssdiff = 1; | ||
377 | 376 | ||
378 | print_ssdiff_link(); | 377 | print_ssdiff_link(); |
379 | cgit_print_diffstat(old_rev_sha1, new_rev_sha1, prefix); | 378 | cgit_print_diffstat(old_rev_sha1, new_rev_sha1, prefix); |