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>
This commit is contained in:
John Keeping
2014-10-05 10:59:04 +01:00
committed by Lukas Fleischer
父節點 03f537f1a1
當前提交 1830271c59
共有 4 個文件被更改,包括 24 次插入14 次删除

查看文件

@@ -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) {