aboutsummaryrefslogtreecommitdiffstats
path: root/ui-commit.c
diff options
context:
space:
mode:
authorLars Hjemli2008-04-13 12:48:44 +0200
committerLars Hjemli2008-04-13 12:48:44 +0200
commit76ba6287bfb533baca7285b107b5d975581d449d (patch)
tree22445a77f5b87280ec980f9b4da5a511f1f27faf /ui-commit.c
parent4a842288260a0b0c4a3d4032d441f7fd2afee699 (diff)
parent28d781f34b2c2d4c2b994ef3953d1cf37d8f28f0 (diff)
downloadcgit-76ba6287bfb533baca7285b107b5d975581d449d.tar.gz
cgit-76ba6287bfb533baca7285b107b5d975581d449d.tar.bz2
cgit-76ba6287bfb533baca7285b107b5d975581d449d.zip
Merge branch 'lh/layout'
* lh/layout: Make repository search case insensitive Remove 'patch' link from tab, add to commit view Implement minimal freetext search in the repolist More layout fixes Minor fixup in tree-view css Reintroduce the branch switcher Add fixed link to index page from repo header Include diff in commit view Replace sidebar/logo
Diffstat (limited to 'ui-commit.c')
-rw-r--r--ui-commit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 8019e36..dd36cc0 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -9,6 +9,7 @@
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h" 10#include "html.h"
11#include "ui-shared.h" 11#include "ui-shared.h"
12#include "ui-diff.h"
12 13
13static int files, slots; 14static int files, slots;
14static int total_adds, total_rems, max_changes; 15static int total_adds, total_rems, max_changes;
@@ -174,6 +175,12 @@ void cgit_print_commit(char *hex)
174 html("</td><td class='right'>"); 175 html("</td><td class='right'>");
175 cgit_print_date(info->committer_date, FMT_LONGDATE); 176 cgit_print_date(info->committer_date, FMT_LONGDATE);
176 html("</td></tr>\n"); 177 html("</td></tr>\n");
178 html("<tr><th>commit</th><td colspan='2' class='sha1'>");
179 tmp = sha1_to_hex(commit->object.sha1);
180 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp);
181 html(" (");
182 cgit_patch_link("patch", NULL, NULL, NULL, tmp);
183 html(")</td></tr>\n");
177 html("<tr><th>tree</th><td colspan='2' class='sha1'>"); 184 html("<tr><th>tree</th><td colspan='2' class='sha1'>");
178 tmp = xstrdup(hex); 185 tmp = xstrdup(hex);
179 cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, 186 cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL,
@@ -218,10 +225,11 @@ void cgit_print_commit(char *hex)
218 print_fileinfo(&items[i]); 225 print_fileinfo(&items[i]);
219 html("</table>"); 226 html("</table>");
220 html("<div class='diffstat-summary'>"); 227 html("<div class='diffstat-summary'>");
221 htmlf("%d files changed, %d insertions, %d deletions (", 228 htmlf("%d files changed, %d insertions, %d deletions",
222 files, total_adds, total_rems); 229 files, total_adds, total_rems);
223 cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex, 230 cgit_print_diff(ctx.qry.sha1,
224 NULL, NULL); 231 sha1_to_hex(commit->parents->item->object.sha1),
232 NULL);
225 html(")</div>"); 233 html(")</div>");
226 } 234 }
227 cgit_free_commitinfo(info); 235 cgit_free_commitinfo(info);