-rw-r--r-- | ui-diff.c | 14 | ||||
-rw-r--r-- | ui-ssdiff.c | 8 |
2 files changed, 16 insertions, 6 deletions
@@ -255,3 +255,3 @@ static void print_ssdiff_link() | |||
255 | cgit_diff_link("Unidiff", NULL, NULL, ctx.qry.head, | 255 | cgit_diff_link("Unidiff", NULL, NULL, ctx.qry.head, |
256 | ctx.qry.sha1, ctx.qry.sha2, NULL, 1); | 256 | ctx.qry.sha1, ctx.qry.sha2, ctx.qry.path, 1); |
257 | else | 257 | else |
@@ -259,3 +259,3 @@ static void print_ssdiff_link() | |||
259 | ctx.qry.head, ctx.qry.sha1, | 259 | ctx.qry.head, ctx.qry.sha1, |
260 | ctx.qry.sha2, NULL, 1); | 260 | ctx.qry.sha2, ctx.qry.path, 1); |
261 | } | 261 | } |
@@ -283,2 +283,4 @@ static void filepair_cb(struct diff_filepair *pair) | |||
283 | print_line_fn(fmt("+Subproject %s", sha1_to_hex(pair->two->sha1)), 52); | 283 | print_line_fn(fmt("+Subproject %s", sha1_to_hex(pair->two->sha1)), 52); |
284 | if (use_ssdiff) | ||
285 | cgit_ssdiff_footer(); | ||
284 | return; | 286 | return; |
@@ -288,4 +290,8 @@ static void filepair_cb(struct diff_filepair *pair) | |||
288 | cgit_print_error("Error running diff"); | 290 | cgit_print_error("Error running diff"); |
289 | if (binary) | 291 | if (binary) { |
290 | print_line_fn(" Binary files differ", 20); | 292 | if (use_ssdiff) |
293 | html("<tr><td colspan='4'>Binary files differ</td></tr>"); | ||
294 | else | ||
295 | html("Binary files differ"); | ||
296 | } | ||
291 | if (use_ssdiff) | 297 | if (use_ssdiff) |
diff --git a/ui-ssdiff.c b/ui-ssdiff.c index 8215051..5673642 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c | |||
@@ -110,2 +110,4 @@ static void print_ssdiff_line(char *class, int old_line_no, char *old_line, | |||
110 | old_line_no, class); | 110 | old_line_no, class); |
111 | else if (old_line) | ||
112 | htmlf("<td class='lineno'></td><td class='%s'>", class); | ||
111 | else | 113 | else |
@@ -124,2 +126,4 @@ static void print_ssdiff_line(char *class, int old_line_no, char *old_line, | |||
124 | new_line_no, class); | 126 | new_line_no, class); |
127 | else if (new_line) | ||
128 | htmlf("<td class='lineno'></td><td class='%s'>", class); | ||
125 | else | 129 | else |
@@ -253,4 +257,4 @@ void cgit_ssdiff_header_begin() | |||
253 | { | 257 | { |
254 | current_old_line = 0; | 258 | current_old_line = -1; |
255 | current_new_line = 0; | 259 | current_new_line = -1; |
256 | html("<tr><td class='space' colspan='4'><div></div></td></tr>"); | 260 | html("<tr><td class='space' colspan='4'><div></div></td></tr>"); |