summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Unidiff
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 25721ca..ed25824 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -4,12 +4,13 @@
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h"
10 11
11static int files, slots; 12static int files, slots;
12static int total_adds, total_rems, max_changes; 13static int total_adds, total_rems, max_changes;
13static int lines_added, lines_removed; 14static int lines_added, lines_removed;
14static char *curr_rev; 15static char *curr_rev;
15 16
@@ -59,22 +60,22 @@ void print_fileinfo(struct fileinfo *info)
59 die("bug: unhandled diff status %c", info->status); 60 die("bug: unhandled diff status %c", info->status);
60 } 61 }
61 62
62 html("<tr>"); 63 html("<tr>");
63 htmlf("<td class='mode'>"); 64 htmlf("<td class='mode'>");
64 if (is_null_sha1(info->new_sha1)) { 65 if (is_null_sha1(info->new_sha1)) {
65 html_filemode(info->old_mode); 66 cgit_print_filemode(info->old_mode);
66 } else { 67 } else {
67 html_filemode(info->new_mode); 68 cgit_print_filemode(info->new_mode);
68 } 69 }
69 70
70 if (info->old_mode != info->new_mode && 71 if (info->old_mode != info->new_mode &&
71 !is_null_sha1(info->old_sha1) && 72 !is_null_sha1(info->old_sha1) &&
72 !is_null_sha1(info->new_sha1)) { 73 !is_null_sha1(info->new_sha1)) {
73 html("<span class='modechange'>["); 74 html("<span class='modechange'>[");
74 html_filemode(info->old_mode); 75 cgit_print_filemode(info->old_mode);
75 html("]</span>"); 76 html("]</span>");
76 } 77 }
77 htmlf("</td><td class='%s'>", class); 78 htmlf("</td><td class='%s'>", class);
78 cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev, 79 cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev,
79 NULL, info->new_path); 80 NULL, info->new_path);
80 if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED) 81 if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED)