about summary refs log tree commit diff stats
path: root/ui-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/ui-log.c b/ui-log.c index bb17e1d..d38e40a 100644 --- a/ui-log.c +++ b/ui-log.c
@@ -31,11 +31,8 @@ void print_commit(struct commit *commit)
31 html("<tr><td>"); 31 html("<tr><td>");
32 cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); 32 cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE);
33 html("</td><td>"); 33 html("</td><td>");
34 char *qry = fmt("h=%s", sha1_to_hex(commit->object.sha1)); 34 cgit_commit_link(info->subject, NULL, NULL, cgit_query_head,
35 char *url = cgit_pageurl(cgit_query_repo, "commit", qry); 35 sha1_to_hex(commit->object.sha1));
36 html_link_open(url, NULL, NULL);
37 html_ntxt(cgit_max_msg_len, info->subject);
38 html_link_close();
39 if (cgit_repo->enable_log_filecount) { 36 if (cgit_repo->enable_log_filecount) {
40 files = 0; 37 files = 0;
41 lines = 0; 38 lines = 0;
@@ -62,6 +59,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, i
62 int argc = 2; 59 int argc = 2;
63 int i; 60 int i;
64 61
62 if (!tip)
63 argv[1] = cgit_query_head;
64
65 if (grep) 65 if (grep)
66 argv[argc++] = fmt("--grep=%s", grep); 66 argv[argc++] = fmt("--grep=%s", grep);
67 if (path) { 67 if (path) {
@@ -113,17 +113,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, i
113 if (pager) { 113 if (pager) {
114 html("<div class='pager'>"); 114 html("<div class='pager'>");
115 if (ofs > 0) { 115 if (ofs > 0) {
116 html("&nbsp;<a href='"); 116 cgit_log_link("[prev]", NULL, NULL, cgit_query_head,
117 html(cgit_pageurl(cgit_query_repo, cgit_query_page, 117 cgit_query_sha1, cgit_query_path,
118 fmt("h=%s&amp;ofs=%d", tip, ofs-cnt))); 118 ofs - cnt);
119 html("'>[prev]</a>&nbsp;"); 119 html("&nbsp;");
120 } 120 }
121
122 if ((commit = get_revision(&rev)) != NULL) { 121 if ((commit = get_revision(&rev)) != NULL) {
123 html("&nbsp;<a href='"); 122 cgit_log_link("[next]", NULL, NULL, cgit_query_head,
124 html(cgit_pageurl(cgit_query_repo, "log", 123 cgit_query_sha1, cgit_query_path,
125 fmt("h=%s&amp;ofs=%d", tip, ofs+cnt))); 124 ofs + cnt);
126 html("'>[next]</a>&nbsp;");
127 } 125 }
128 html("</div>"); 126 html("</div>");
129 } 127 }