diff options
author | John Keeping | 2014-10-05 10:59:04 +0100 |
---|---|---|
committer | Lukas Fleischer | 2014-12-13 12:38:42 +0100 |
commit | 1830271c5958526425f92ae2b369646b54e3c370 (patch) | |
tree | 545cca72fa7f672fe0a728f25a545dce10961d1d /cgit.h | |
parent | 03f537f1a134c8578ae4c16055596539fbbcc220 (diff) | |
download | cgit-1830271c5958526425f92ae2b369646b54e3c370.tar.gz cgit-1830271c5958526425f92ae2b369646b54e3c370.tar.bz2 cgit-1830271c5958526425f92ae2b369646b54e3c370.zip |
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 'cgit.h')
-rw-r--r-- | cgit.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -53,6 +53,10 @@ typedef void (*filepair_fn)(struct diff_filepair *pair); | |||
53 | typedef void (*linediff_fn)(char *line, int len); | 53 | typedef void (*linediff_fn)(char *line, int len); |
54 | 54 | ||
55 | typedef enum { | 55 | typedef enum { |
56 | DIFF_UNIFIED, DIFF_SSDIFF | ||
57 | } diff_type; | ||
58 | |||
59 | typedef enum { | ||
56 | ABOUT, COMMIT, SOURCE, EMAIL, AUTH | 60 | ABOUT, COMMIT, SOURCE, EMAIL, AUTH |
57 | } filter_type; | 61 | } filter_type; |
58 | 62 | ||
@@ -150,7 +154,7 @@ struct reflist { | |||
150 | struct cgit_query { | 154 | struct cgit_query { |
151 | int has_symref; | 155 | int has_symref; |
152 | int has_sha1; | 156 | int has_sha1; |
153 | int has_ssdiff; | 157 | int has_difftype; |
154 | char *raw; | 158 | char *raw; |
155 | char *repo; | 159 | char *repo; |
156 | char *page; | 160 | char *page; |
@@ -168,7 +172,7 @@ struct cgit_query { | |||
168 | int nohead; | 172 | int nohead; |
169 | char *sort; | 173 | char *sort; |
170 | int showmsg; | 174 | int showmsg; |
171 | int ssdiff; | 175 | diff_type difftype; |
172 | int show_all; | 176 | int show_all; |
173 | int context; | 177 | int context; |
174 | int ignorews; | 178 | int ignorews; |
@@ -245,7 +249,7 @@ struct cgit_config { | |||
245 | int summary_branches; | 249 | int summary_branches; |
246 | int summary_log; | 250 | int summary_log; |
247 | int summary_tags; | 251 | int summary_tags; |
248 | int ssdiff; | 252 | diff_type difftype; |
249 | int branch_sort; | 253 | int branch_sort; |
250 | int commit_sort; | 254 | int commit_sort; |
251 | struct string_list mimetypes; | 255 | struct string_list mimetypes; |