summaryrefslogtreecommitdiffabout
path: root/ui-summary.c
Unidiff
Diffstat (limited to 'ui-summary.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-summary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-summary.c b/ui-summary.c
index e7158cc..20394de 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -15,33 +15,33 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1,
15{ 15{
16 struct commit *commit; 16 struct commit *commit;
17 struct commitinfo *info; 17 struct commitinfo *info;
18 char buf[256], *url; 18 char buf[256], *url;
19 19
20 strncpy(buf, refname, sizeof(buf)); 20 strncpy(buf, refname, sizeof(buf));
21 commit = lookup_commit(sha1); 21 commit = lookup_commit(sha1);
22 if (commit && !parse_commit(commit)){ 22 if (commit && !parse_commit(commit)){
23 info = cgit_parse_commit(commit); 23 info = cgit_parse_commit(commit);
24 html("<tr><td>"); 24 html("<tr><td>");
25 url = cgit_pageurl(cgit_query_repo, "log", 25 url = cgit_pageurl(cgit_query_repo, "log",
26 fmt("h=%s", refname)); 26 fmt("h=%s", refname));
27 html_link_open(url, NULL, NULL); 27 html_link_open(url, NULL, NULL);
28 html_txt(buf); 28 html_txt(buf);
29 html_link_close(); 29 html_link_close();
30 html("</td><td>"); 30 html("</td><td>");
31 cgit_print_date(commit->date); 31 cgit_print_date(commit->date, FMT_LONGDATE);
32 html("</td><td>"); 32 html("</td><td>");
33 html_txt(info->author); 33 html_txt(info->author);
34 html("</td><td>"); 34 html("</td><td>");
35 url = cgit_pageurl(cgit_query_repo, "commit", 35 url = cgit_pageurl(cgit_query_repo, "commit",
36 fmt("h=%s", sha1_to_hex(sha1))); 36 fmt("h=%s", sha1_to_hex(sha1)));
37 html_link_open(url, NULL, NULL); 37 html_link_open(url, NULL, NULL);
38 html_ntxt(cgit_max_msg_len, info->subject); 38 html_ntxt(cgit_max_msg_len, info->subject);
39 html_link_close(); 39 html_link_close();
40 html("</td></tr>\n"); 40 html("</td></tr>\n");
41 cgit_free_commitinfo(info); 41 cgit_free_commitinfo(info);
42 } else { 42 } else {
43 html("<tr><td>"); 43 html("<tr><td>");
44 html_txt(buf); 44 html_txt(buf);
45 html("</td><td colspan='3'>"); 45 html("</td><td colspan='3'>");
46 htmlf("*** bad ref %s ***", sha1_to_hex(sha1)); 46 htmlf("*** bad ref %s ***", sha1_to_hex(sha1));
47 html("</td></tr>\n"); 47 html("</td></tr>\n");
@@ -95,33 +95,33 @@ static int cgit_print_tag_cb(const char *refname, const unsigned char *sha1,
95 if (!obj) 95 if (!obj)
96 return 1; 96 return 1;
97 if (obj->type == OBJ_TAG) { 97 if (obj->type == OBJ_TAG) {
98 tag = lookup_tag(sha1); 98 tag = lookup_tag(sha1);
99 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) 99 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
100 return 2; 100 return 2;
101 if (!header) 101 if (!header)
102 print_tag_header(); 102 print_tag_header();
103 html("<tr><td>"); 103 html("<tr><td>");
104 url = cgit_pageurl(cgit_query_repo, "view", 104 url = cgit_pageurl(cgit_query_repo, "view",
105 fmt("id=%s", sha1_to_hex(sha1))); 105 fmt("id=%s", sha1_to_hex(sha1)));
106 html_link_open(url, NULL, NULL); 106 html_link_open(url, NULL, NULL);
107 html_txt(buf); 107 html_txt(buf);
108 html_link_close(); 108 html_link_close();
109 html("</td><td>"); 109 html("</td><td>");
110 if (info->tagger_date > 0) 110 if (info->tagger_date > 0)
111 cgit_print_date(info->tagger_date); 111 cgit_print_date(info->tagger_date, FMT_LONGDATE);
112 html("</td><td>"); 112 html("</td><td>");
113 if (info->tagger) 113 if (info->tagger)
114 html(info->tagger); 114 html(info->tagger);
115 html("</td><td>"); 115 html("</td><td>");
116 cgit_print_object_ref(tag->tagged); 116 cgit_print_object_ref(tag->tagged);
117 html("</td></tr>\n"); 117 html("</td></tr>\n");
118 } else { 118 } else {
119 if (!header) 119 if (!header)
120 print_tag_header(); 120 print_tag_header();
121 html("<tr><td>"); 121 html("<tr><td>");
122 html_txt(buf); 122 html_txt(buf);
123 html("</td><td colspan='2'/><td>"); 123 html("</td><td colspan='2'/><td>");
124 cgit_print_object_ref(obj); 124 cgit_print_object_ref(obj);
125 html("</td></tr>\n"); 125 html("</td></tr>\n");
126 } 126 }
127 return 0; 127 return 0;