|
diff --git a/cgit.c b/cgit.c index fedf355..6dddcbb 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -110,5 +110,5 @@ static void cgit_print_repo_page(struct cacheitem *item) |
110 | cgit_print_commit(cgit_query_sha1); |
110 | cgit_print_commit(cgit_query_sha1); |
111 | } else if (!strcmp(cgit_query_page, "view")) { |
111 | } else if (!strcmp(cgit_query_page, "view")) { |
112 | cgit_print_view(cgit_query_sha1); |
112 | cgit_print_view(cgit_query_sha1, cgit_query_path); |
113 | } else if (!strcmp(cgit_query_page, "diff")) { |
113 | } else if (!strcmp(cgit_query_page, "diff")) { |
114 | cgit_print_diff(cgit_query_sha1, cgit_query_sha2); |
114 | cgit_print_diff(cgit_query_sha1, cgit_query_sha2); |
|
|
diff --git a/cgit.h b/cgit.h index 222c9c2..2615231 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -156,5 +156,5 @@ extern void cgit_print_repolist(struct cacheitem *item); |
156 | extern void cgit_print_summary(); |
156 | extern void cgit_print_summary(); |
157 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep); |
157 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep); |
158 | extern void cgit_print_view(const char *hex); |
158 | extern void cgit_print_view(const char *hex, char *path); |
159 | extern void cgit_print_tree(const char *hex, char *path); |
159 | extern void cgit_print_tree(const char *hex, char *path); |
160 | extern void cgit_print_commit(const char *hex); |
160 | extern void cgit_print_commit(const char *hex); |
|
|
diff --git a/ui-view.c b/ui-view.c index 9d23c45..7d022fd 100644 --- a/ ui-view.c+++ b/ ui-view.c |
|
@@ -9,5 +9,5 @@ |
9 | #include "cgit.h" |
9 | #include "cgit.h" |
10 | |
10 | |
11 | void cgit_print_view(const char *hex) |
11 | void cgit_print_view(const char *hex, char *path) |
12 | { |
12 | { |
13 | unsigned char sha1[20]; |
13 | unsigned char sha1[20]; |
@@ -35,6 +35,11 @@ void cgit_print_view(const char *hex) |
35 | buf[size] = '\0'; |
35 | buf[size] = '\0'; |
36 | html("<table class='list'>\n"); |
36 | html("<table class='list'>\n"); |
37 | htmlf("<tr class='nohover'><th class='left'>%s %s, %li bytes</th></tr>\n", |
37 | html("<tr class='nohover'><th class='left'>"); |
38 | typename(type), hex, size); |
38 | if (path) |
| |
39 | htmlf("%s (", path); |
| |
40 | htmlf("%s %s, %li bytes", typename(type), hex, size); |
| |
41 | if (path) |
| |
42 | html(")"); |
| |
43 | html("</th></tr>\n"); |
39 | html("<tr><td class='blob'>\n"); |
44 | html("<tr><td class='blob'>\n"); |
40 | html_txt(buf); |
45 | html_txt(buf); |
|