summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h2
-rw-r--r--ui-view.c11
3 files changed, 10 insertions, 5 deletions
diff --git a/cgit.c b/cgit.c
index fedf355..6dddcbb 100644
--- a/cgit.c
+++ b/cgit.c
@@ -111,3 +111,3 @@ static void cgit_print_repo_page(struct cacheitem *item)
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")) {
diff --git a/cgit.h b/cgit.h
index 222c9c2..2615231 100644
--- a/cgit.h
+++ b/cgit.h
@@ -157,3 +157,3 @@ extern void cgit_print_summary();
157extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep); 157extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep);
158extern void cgit_print_view(const char *hex); 158extern void cgit_print_view(const char *hex, char *path);
159extern void cgit_print_tree(const char *hex, char *path); 159extern void cgit_print_tree(const char *hex, char *path);
diff --git a/ui-view.c b/ui-view.c
index 9d23c45..7d022fd 100644
--- a/ui-view.c
+++ b/ui-view.c
@@ -10,3 +10,3 @@
10 10
11void cgit_print_view(const char *hex) 11void cgit_print_view(const char *hex, char *path)
12{ 12{
@@ -36,4 +36,9 @@ void cgit_print_view(const char *hex)
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");