|
diff --git a/ui-log.c b/ui-log.c index 31331ef..c52af79 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -18,23 +18,18 @@ void print_commit(struct commit *commit) |
18 | time = gmtime(&commit->date); |
18 | time = gmtime(&commit->date); |
19 | html("<tr><td>"); |
19 | html("<tr><td>"); |
20 | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); |
20 | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); |
21 | html_txt(buf); |
21 | html_txt(buf); |
22 | html("</td><td>"); |
22 | html("</td><td>"); |
23 | char *qry = fmt("id=%s", sha1_to_hex(commit->object.sha1)); |
23 | char *qry = fmt("id=%s", sha1_to_hex(commit->object.sha1)); |
24 | char *url = cgit_pageurl(cgit_query_repo, "view", qry); |
24 | char *url = cgit_pageurl(cgit_query_repo, "commit", qry); |
25 | html_link_open(url, NULL, NULL); |
25 | html_link_open(url, NULL, NULL); |
26 | html_txt(info->subject); |
26 | html_txt(info->subject); |
27 | html_link_close(); |
27 | html_link_close(); |
28 | html("</td><td>"); |
28 | html("</td><td>"); |
29 | html_txt(info->author); |
29 | html_txt(info->author); |
30 | html("</td><td><a href='"); |
| |
31 | html_attr(cgit_pageurl(cgit_query_repo, "tree", |
| |
32 | fmt("id=%s", |
| |
33 | sha1_to_hex(commit->tree->object.sha1)))); |
| |
34 | html("'>tree</a>"); |
| |
35 | html("</td></tr>\n"); |
30 | html("</td></tr>\n"); |
36 | free(info->author); |
31 | free(info->author); |
37 | free(info->committer); |
32 | free(info->committer); |
38 | free(info->subject); |
33 | free(info->subject); |
39 | free(info); |
34 | free(info); |
40 | } |
35 | } |
@@ -53,14 +48,14 @@ void cgit_print_log(const char *tip, int ofs, int cnt) |
53 | rev.verbose_header = 1; |
48 | rev.verbose_header = 1; |
54 | rev.show_root_diff = 0; |
49 | rev.show_root_diff = 0; |
55 | setup_revisions(2, argv, &rev, NULL); |
50 | setup_revisions(2, argv, &rev, NULL); |
56 | prepare_revision_walk(&rev); |
51 | prepare_revision_walk(&rev); |
57 | |
52 | |
58 | html("<h2>Log</h2>"); |
53 | html("<h2>Log</h2>"); |
59 | html("<table class='list'>"); |
54 | html("<table class='list log'>"); |
60 | html("<tr><th>Date</th><th>Message</th><th>Author</th><th>Link</th></tr>\n"); |
55 | html("<tr><th class='left'>Date</th><th class='left'>Message</th><th class='left'>Author</th></tr>\n"); |
61 | |
56 | |
62 | if (ofs<0) |
57 | if (ofs<0) |
63 | ofs = 0; |
58 | ofs = 0; |
64 | |
59 | |
65 | for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) { |
60 | for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) { |
66 | free(commit->buffer); |
61 | free(commit->buffer); |
|