aboutsummaryrefslogtreecommitdiff
path: root/ui-shared.c
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2014-10-05 10:59:04 +0100
committerLukas Fleischer <cgit@cryptocrack.de>2014-12-13 12:38:42 +0100
commit1830271c5958526425f92ae2b369646b54e3c370 (patch)
tree545cca72fa7f672fe0a728f25a545dce10961d1d /ui-shared.c
parent03f537f1a134c8578ae4c16055596539fbbcc220 (diff)
downloadcgit-1830271c5958526425f92ae2b369646b54e3c370.tar.gz
cgit-1830271c5958526425f92ae2b369646b54e3c370.tar.bz2
Change "ss" diff flag to an enum
This will allow us to introduce a new "stat only" diff mode without needing an explosion of mutually incompatible flags. The old "ss" query parameter is still accepted in order to avoid breaking saved links, but we no longer generate any URIs using it; instead the new "dt" (diff type) parameter is used. Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 68e0d7c..6243d1b 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -346,9 +346,9 @@ void cgit_commit_link(char *name, const char *title, const char *class,
html_url_arg(rev);
delim = "&amp;";
}
- if (ctx.qry.ssdiff) {
+ if (ctx.qry.difftype) {
html(delim);
- html("ss=1");
+ htmlf("dt=%d", ctx.qry.difftype);
delim = "&amp;";
}
if (ctx.qry.context > 0 && ctx.qry.context != 3) {
@@ -402,9 +402,9 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
html_url_arg(old_rev);
delim = "&amp;";
}
- if (ctx.qry.ssdiff) {
+ if (ctx.qry.difftype) {
html(delim);
- html("ss=1");
+ htmlf("dt=%d", ctx.qry.difftype);
delim = "&amp;";
}
if (ctx.qry.context > 0 && ctx.qry.context != 3) {